Sub MakePDFNS()
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Adobe PDF:", Collate:=True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 2
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
Filename = "G:\Group\Gfin\Rob_Young\" & ActiveSheet.Range("NS!C3:C4").Value & "NS"
SendKeys Filename & "{ENTER}", False
End Sub
this code leaves a sour taste in my mouth because it has been almost 2 weeks now and still it is failing. Am I missing something important in this VB code?
The line giving the Type Mismatch Error is "Filename = "G:\Group..." "
Please help?
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Adobe PDF:", Collate:=True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 2
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
Filename = "G:\Group\Gfin\Rob_Young\" & ActiveSheet.Range("NS!C3:C4").Value & "NS"
SendKeys Filename & "{ENTER}", False
End Sub
this code leaves a sour taste in my mouth because it has been almost 2 weeks now and still it is failing. Am I missing something important in this VB code?
The line giving the Type Mismatch Error is "Filename = "G:\Group..." "
Please help?