JPARKHURST
Board Regular
- Joined
- Oct 25, 2016
- Messages
- 151
Getting Runtime error 424 Object Expected.
Attempting to get several functions to run, I'm encountering an error from go. I still have much learnign to do in Excel, I'm not really sure what to research on this, though. Any help is welcome.
Error is occurring on the second line where I am attempting to setup a range.
Here is the complete sub:
Sub PrepareSchedule()
Dim rngJobDispatch As Range
rngJobDispatch = wbSchedule.wsJobDispatch.UsedRange
'Clear Worksheet we will be moving data to3
ClearWorksheet wsWorkingDispatch, "D"
MsgBox ("ClearWorksheet has been completed")
'Sort Range
SortRange (rngJobDispatch)
MsgBox ("SortRange has been completed")
'Replace Assy & Pack
ReplaceAP
MsgBox ("Replace Assy & Pack has been completed")
'Copy Job_Dispatch Jobs List to Working_Dispatch
wsJobDispatch.Range("B:B").Copy (wsWorkingDispatch.Range("D:D"))
MsgBox ("Jobs have been copied from Job_Dispatch to Working_Dispatch")
'Clear Shortage Report to Prepare for Dump
ClearWorksheet wsShortages, "B"
MsgBox ("Shortage Report has been cleared and is ready for dump.")
End Sub
TIA,
Jon
Attempting to get several functions to run, I'm encountering an error from go. I still have much learnign to do in Excel, I'm not really sure what to research on this, though. Any help is welcome.
Error is occurring on the second line where I am attempting to setup a range.
Here is the complete sub:
Sub PrepareSchedule()
Dim rngJobDispatch As Range
rngJobDispatch = wbSchedule.wsJobDispatch.UsedRange
'Clear Worksheet we will be moving data to3
ClearWorksheet wsWorkingDispatch, "D"
MsgBox ("ClearWorksheet has been completed")
'Sort Range
SortRange (rngJobDispatch)
MsgBox ("SortRange has been completed")
'Replace Assy & Pack
ReplaceAP
MsgBox ("Replace Assy & Pack has been completed")
'Copy Job_Dispatch Jobs List to Working_Dispatch
wsJobDispatch.Range("B:B").Copy (wsWorkingDispatch.Range("D:D"))
MsgBox ("Jobs have been copied from Job_Dispatch to Working_Dispatch")
'Clear Shortage Report to Prepare for Dump
ClearWorksheet wsShortages, "B"
MsgBox ("Shortage Report has been cleared and is ready for dump.")
End Sub
TIA,
Jon