View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] soxcpa@gmail.com is offline
external usenet poster
 
Posts: 3
Default macro open files

I don't have the macro so I can't test this but a lot of the file
access functions do not like expressions in the function. You can avoid
this by creating a temporary string to hold the value you are
evaluating. Try adding:

Dim myFileName as String
myFileName = "C:\Documents and Settings\AllUsers\Documents\Coop
Students\Small Package Rates\UPS rates\" & nm & "\Air\" & filetypenm

and changing the action to:

Application.GetOpenFilename(myFileName)