Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I have this basic code. I would like it to be activated as soon as I paste my data to my worksheet. I know it works, jus want the macro to activate as soon as I paste it. I would like to avoid having buttons. The code is
The following code is what I have in one of my modules. If i am going to post as a "private" Sub I already have
Thank you!
VBA Code:
Sub delCol()
Dim sourceSheet As Worksheet
Set sourceSheet = Sheet1
sourceSheet.Range("A:A, G:H, J:L, N:X, Z:AD").EntireColumn.Delete
End Sub
The following code is what I have in one of my modules. If i am going to post as a "private" Sub I already have
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Columns.AutoFit
End Sub
Thank you!