Is it possible in VBA to combine the 3 lines![]()
Sub main0() Dim wb As Excel.Application Dim ws As Worksheet Set wb = GetObject(, "excel.application") Set ws = Worksheets("blue") 'wb.Visible = True 'ws.Activate 'Range("A1").Select wb.ws.rng.Select End Sub
into the following line?![]()
'wb.Visible = True 'ws.Activate 'Range("A1").Select
Basically this is to simplify the room the code takes up. Any help is appreciated.![]()
wb.ws.rng.Select
Bookmarks