View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dr chuck dr chuck is offline
external usenet poster
 
Posts: 74
Default string variables in file names

thanks for the syntax help dave.

--
dr chuck


"Dave Peterson" wrote:

Yep:

dim antfile as string
antfile = "somestringhere"

Workbooks.Open Filename:= _
"C:\Documents and Settings\HP_Owner\Desktop\PanelSelect\panels\" & antfile


dr chuck wrote:

Can i use a defined string variable in a file name when opening? if so what
is the appropriate syntax?

example....

Workbooks.Open Filename:= _
"C:\Documents and Settings\HP_Owner\Desktop\PanelSelect\panels\16-1
letterO.xls"

i want to use a string variable named "antfile" in place of the file name
16-1letterO.xls

--
dr chuck


--

Dave Peterson