Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro doesnt run
I wrote macro that opens file with the name from the cell B8. The file is placed in the same folder as the file with macro. The macro worked few days ago, but now does not work at all. Whats wrong with it ? Here is the code: Sheets("Instruction").Select Workbooks.Open Filename:= _ ".\" & Range("B8").Value & ".xls" The error 1004 occurs when I try to run it (cannot find the file), but file is placed for sure. Actually it works when I put the full name and path where the file is placed, but it doesnt satisfy me. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro doesnt run
Depending on where the code is, maybe the code isn't picking up the correct B8
cell. Sheets("Instruction").Select Workbooks.Open Filename:=".\" & sheets("instruction").Range("B8").Value & ".xls" Or it may be a problem with what's in B8--is it a number/time/date??? Illuminati wrote: I wrote macro that opens file with the name from the cell B8. The file is placed in the same folder as the file with macro. The macro worked few days ago, but now does not work at all. Whats wrong with it ? Here is the code: Sheets("Instruction").Select Workbooks.Open Filename:= _ ".\" & Range("B8").Value & ".xls" The error 1004 occurs when I try to run it (cannot find the file), but file is placed for sure. Actually it works when I put the full name and path where the file is placed, but it doesnt satisfy me. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why doesnt it change sheet in the macro | Excel Worksheet Functions | |||
My first macro, uses Vlookup but doesnt update unless hit enter | Excel Worksheet Functions | |||
some functions doesnt work in macro? | Excel Programming | |||
Please help : Macro doesnt work on other PCs | Excel Programming | |||
running a macro ina workbook that doesnt have that macro | Excel Programming |