Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,616
- Office Version
- 365
- 2016
- Platform
- Windows
WHen I compile my VBA project, I get an error with this procedure. It won't even start the procedure, giving me the error "Expected End Sub", with the worksheet reference highlighted. (hightlighted below in blue)
I'm not sure what that error means ... I do have an "End Sub"
I'm not sure what that error means ... I do have an "End Sub"
Rich (BB code):
Sub open_permit()
Application.ScreenUpdating = False
strpath = "D:/WSOP 2020/permit_data.xlsx"
Workbooks.Open strpath
Set wb_permit = Workbooks("permit_data.xlsx")
Set ws_permit = wb_permit.Worksheets("Permit_Data")
Set ws_cust = wb_permit.Worksheets("Customer_Default")
If ws_permit.AutoFilterMode Then ws_permit.AutoFilterMode = False
lrow = ws_permit.Cells(ws_permit.Rows.Count, "A").End(xlUp).Row
Set rngPermit = ws_fac.Range("A1:BO" & lrow)
lrow = ws_cust.Cells(ws_cust.Rows.Count, "A").End(xlUp).Row
Set rngCust = ws_cust.Range("A1:AG" & lrow)
wb_permit.Windows(1).Visible = False
Application.ScreenUpdating = True
ws_front.Unprotect
With ws_front.Cells(5, 1)
.Value = "Permit Data"
.Font.Color = RGB(24, 160, 35) 'green
End With
ws_front.Pictures("hidden3").Visible = True
ws_front.Protect
End Sub