[AccessD] //s Slashes in File Name

Stuart McLachlan stuart at lexacorp.com.pg
Fri Jun 16 18:05:45 CDT 2006


On 16 Jun 2006 at 16:00, Bob Heygood wrote:

> Hello to the list,
> I am having a failure when running the line of code below:
> appExcel.ActiveWorkbook.SaveAs FileName:=strNewFileName
> 
> This works well until I assign a value with a / to the variable -
> strNewFileName
> 
> When I remove the / all is well.
> 
> What's the best solution if my client insists on keeping the /s in the
> resulting file name?
> 

Change Operating System. :-)
"/" is not a legal character in a DOS/Windows filename.

As an alternative:

If Instr(strFilename,"/") > 0 then
   Msgbox "Microsoft does not allow you to use / in a fleiname"
   .....

-- 
Stuart





More information about the AccessD mailing list