Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error when running macro
Hi,
I have the following code that runs fine when the file is opened from my directory, however when opened from a file attached to an email, a code 9 error occurs. I think it's to do with the file name when opened from an email being ~7341470.xls (or similar) whereas it has a proper name when opened from a directory. Is there a way to overcome this, perhaps by checking whether the file has ~ in its name? Dim iFname As String Range("A1").Formula = _ "=VLOOKUP(D2,[" + iFname + "]Database,2,False)" Thanks, Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error 400 when running Macro | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
Error Running a Macro | Excel Discussion (Misc queries) |