MagnaForce
New Member
- Joined
- Jul 1, 2021
- Messages
- 21
- Office Version
- 365
- Platform
- Windows
Need some help getting an area selected to become a variable. The reason is there are other areas on the sheet I do not want to print and I am going to be using print selected.
VBA Code:
'Need to make this a variable
With Sheets("CWS")
.Range("A1:O" & .Range("B" & Rows.Count).End(xlUp).Row).Select
End With
'This is where I need the variable to be
ActiveSheet.PageSetup.PrintArea = "Variable goes here"