'1004' - Application defined or Object defined

G

Guest

I get this error at "ActiveWorkbook.SaveCopyAs Filename:=jobsave"


Private Sub CommandButton4_Click() 'Save time sheet
Dim jobname As String
Dim jobemployee As String
Dim Jobdate As String
Dim jobnumber As String
Dim jobsave As String


Jobdate = Range("C10").Value ' set date format to mm-dd-yy

Jobdate = Month(Jobdate) & "-" & Day(Jobdate) & "-" & Year(Jobdate)
jobname = Range("D6")
jobemployee = Range("E3")
jobnumber = Range("D4")

jobsave = InputBox("Please enter TIME SHEET file name to save",
" Process Technology", "" & "C:Time Sheets\ " + jobnumber + " " +
jobemployee + " " + (Jobdate))
If jobsave = "" Then

Range("A1").Select
Range("D3").Select

Else
ActiveWorkbook.SaveCopyAs Filename:=jobsave

On Error GoTo ErrorHandler:
Range("A1").Select
Range("D3").Select
End If
ErrorHandler:

Range("A1").Select
Range("D3").Select

End Sub

oldjay
 
G

Guest

Corrected but it still doesn't work

jobsave = InputBox("Please enter TIME SHEET file name to save",
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top