blaksnm
Well-known Member
- Joined
- Dec 15, 2009
- Messages
- 554
- Office Version
- 365
- Platform
- Windows
Hey Guys
Todays second problem:
My filenames is values of (ex) Range("A10") and my macro uses this value to open the file - all is ok
When I insert a new row the filename is now changed to a value of range("A11") but my macro will not read this change automaticly and still look for value in A10
I have tryed to give the cell A10 a name ; "Filename" to with se the influence of the inserted row on the macro result, but the only effect is an error.
Original statement (one of several):
Set wbk1 = Workbooks.Open(Filename:=Range("A10").Value)
Revised statement:
Set wbk1 = Workbooks.Open(Filename:=ActiveWorkbook.Names(Filename").Value)
Where is the road ahead?
Todays second problem:
My filenames is values of (ex) Range("A10") and my macro uses this value to open the file - all is ok
When I insert a new row the filename is now changed to a value of range("A11") but my macro will not read this change automaticly and still look for value in A10
I have tryed to give the cell A10 a name ; "Filename" to with se the influence of the inserted row on the macro result, but the only effect is an error.
Original statement (one of several):
Set wbk1 = Workbooks.Open(Filename:=Range("A10").Value)
Revised statement:
Set wbk1 = Workbooks.Open(Filename:=ActiveWorkbook.Names(Filename").Value)
Where is the road ahead?