excel - Macro stopping at print PDF code -
we use single machine run our vba
macros.
last week changed machine - virtual "server" running windows 7: i'll use term server quite loosely more virtualised-pc.
everything running smoothly apart 1 line of code:
excel.activesheet.exportasfixedformat _ type:=xltypepdf, _ filename:=filepath_pdf & filename_pdf, _ quality:=xlqualitystandard, _ includedocproperties:=true, _ ignoreprintareas:=false, _ from:=1, _ to:=2, _ openafterpublish:=false
unfortunately error message reported when bugs not descriptive , if go debug mode , hit f8
runs line ok!
it running under credentials of network login not network login.
login same 1 used our previous non-virtual excel box.
is there software need double-check installed on new box?
there alternative approach take move contents of file pdf
file?
[note third parties: not answer problem]
example of error handling:
public sub boo(byval calendar variant) on error goto errhandler dim sprocedurename string: sprocedurename = "boo" 'code here exitprocedure: on error resume next 'final termination here exit sub errhandler: debug.print "error """ & err.description & """ in " & sprocedurename goto exitprocedure: resume 'used debugging, never hit in run time end sub
Comments
Post a Comment