Hi guys!
I need some help.
Here is what I'm trying to do, I open 2 spreadsheet, spreadsheet1 and spreadsheet2
I put in my macro into one of it, say, spreadsheet1.
Then I run the macro
I will key spreadsheet1 when the sp1 input box come out and spreadsheet2 when the sp2 input box come out. But after that it give me subscript out of range error at
Yet, sometimes it work. Even if I use
, it only sometimes will work.
How do I make it 100% working???
I need some help.
Here is what I'm trying to do, I open 2 spreadsheet, spreadsheet1 and spreadsheet2
I put in my macro into one of it, say, spreadsheet1.
Then I run the macro
Code:
Sub Macro1()
Application.ScreenUpdating = False
Dim sp1 As String, sp2 As String
sp1 = InputBox("Input first spreadsheet")
sp2 = InputBox("Input second spreadsheet")
Windows(sp2).Activate
I will key spreadsheet1 when the sp1 input box come out and spreadsheet2 when the sp2 input box come out. But after that it give me subscript out of range error at
Code:
Windows(sp2).Activate
Code:
Workbooks(sp2).Activate
How do I make it 100% working???