I am trying the following:
If cell J2 has value/text: test![]()
Please Login or Register to view this content.
and I run the macro it states "O:\Splitsen\.xlsx not found". While it should open workbook O:\Splitsen\test.xlsx
I am trying the following:
If cell J2 has value/text: test![]()
Please Login or Register to view this content.
and I run the macro it states "O:\Splitsen\.xlsx not found". While it should open workbook O:\Splitsen\test.xlsx
Replace this line
With![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
Is the word "test", without quotes, indeed in cell J2?
Your code works for me but if cell J2 in the ActiveSheet (visible sheet when you run the macro) is empty I get the warning you mentioned
On which sheet does J2 hold the filename?
If posting code please use code tags, see here.
Complete script is:
The two lines in red have the text "TEST" stated but I want to change those to the text selected in cell J2.![]()
Please Login or Register to view this content.
@Norie sheet name and file name are is marked blue above.
Last edited by dutchmaste; 06-16-2016 at 08:10 PM.
That code is kind of like different than the original code you posted.![]()
At time of opening this thread I thought it was just a problem with this line. But the questions made me think maybe it is something somewhere else in the script.
Only difference is between first code and the line in the complete code is:
![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
OK but the Range("J2") with TEST in it is it on Sheet Data or HS Lijst ? And which Workbook ?
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
J2 is located in workbook "SPLITSEN_v1.0g.xlsm" and on worksheet "HS lijst"
So something like this should work.
And do you really need to copy an entire worksheet ?![]()
Please Login or Register to view this content.
Works like a charm, thank you so much. No more painkillers for my headache.
You're welcome and thanks for the rep.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks