I have a macro that continues to tell me that an End With and/or End Sub is expected. I continue to add these statements in various ways, but the macro will not complete properly.
Here is the code:
Sub TestDatabase()
'
' TestDatabase Macro
' Macro recorded 11/12/2008 by JLZ
'
' Keyboard Shortcut: Ctrl+t
'
With Windows("file 1.xls")
Range("E2").Copy
Windows("file 2.xls").Range("B3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
With Windows("file 1.xls")
Range("E3").Copy
Windows("file 2.xls").Range("C3").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Windows("file 2.xls").Activate
Rows("3:3").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Windows("file 1.xls").Activate
Range("C9").Select
End With
End Sub
What is the proper order / format for these statements?
Bookmarks