Friday 15 March 2013

Insert prompt in Excel Vba to determine filename to open -



Insert prompt in Excel Vba to determine filename to open -

let's have next files (one each week in year):

test 01.xlsm test 02.xlsm test .....xlsm test 52.xlsm

i want able take file i'd open prompt.

so instead of function ...

workbooks.open filename:= _ "f:\mydocs\test11.xlsm"

... need lets me come in number myself (so in case "11" or whatever value between 01 , 52 depending on week want see results for).

is possible? :s

perhaps:

sub duraln() dim s string s = application.inputbox(prompt:="enter 2 digit suffix", type:=2) workbooks.open filename:= _ "f:\mydocs\test" & s & ".xlsm" end sub

excel vba excel-vba prompt

No comments:

Post a Comment