DataBlake
Well-known Member
- Joined
- Jan 26, 2015
- Messages
- 781
- Office Version
- 2016
- Platform
- Windows
Hello all,
I'm having a problem where i try to run a column moving macro using
the issue is that im running the macro from another sheet
if i remove the worksheet activate or select the code works perfectly
how can i start this macro from any other sheet and it go to the one i want it to and perform the column moving?
any help is greatly appreciated.
I'm having a problem where i try to run a column moving macro using
Code:
Worksheets("MHT").Activate
Dim lastRow As Long
lastRow = Range("A" & Rows.Count).End(xlUp).Row
Columns("F:F").Select
Selection.Cut
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
the issue is that im running the macro from another sheet
if i remove the worksheet activate or select the code works perfectly
how can i start this macro from any other sheet and it go to the one i want it to and perform the column moving?
any help is greatly appreciated.