I'm working on my first macro that works over multiple workbooks and I'm stuck at line 1. I obviously have the syntax wrong but I can't figure out why this code doesn't work. Do I need the full pathname for the workbook name?
I know... I know, this should be basics 101!![]()
Sub Import1() Dim ws As Worksheet: Set ws = Sheets(1) Dim wb As Workbook: Set wb = Workbooks("Training2.xlsx") MsgBox ws.Name MsgBox wb.Name End Sub
GG
Bookmarks