Hi all!
I have a question..
I recorded a macro that deletes the first column from a spreadsheet (its the last spreadsheet in the workbook). I shift all the cells left. Then I delete columns B thru G. What I am after is the data in column 2 from the original columns. It worked fine. I then copied the code and put it behind a button.
Now, when I run this code, the first column selection selects columns A thru H. I don't understand why it is doing that.
Can anyone help?
Thanks!!
ps. Here is my code.
Columns("A:A".Select
Selection.Delete Shift:=xlToLeft
Columns("B:G".Select
Selection.Delete Shift:=xlToLeft
ActiveWindow.SmallScroll Down:=18
Rows("37:38".Select
Selection.Delete Shift:=xlUp
I have a question..
I recorded a macro that deletes the first column from a spreadsheet (its the last spreadsheet in the workbook). I shift all the cells left. Then I delete columns B thru G. What I am after is the data in column 2 from the original columns. It worked fine. I then copied the code and put it behind a button.
Now, when I run this code, the first column selection selects columns A thru H. I don't understand why it is doing that.
Can anyone help?
Thanks!!
ps. Here is my code.
Columns("A:A".Select
Selection.Delete Shift:=xlToLeft
Columns("B:G".Select
Selection.Delete Shift:=xlToLeft
ActiveWindow.SmallScroll Down:=18
Rows("37:38".Select
Selection.Delete Shift:=xlUp