excel vba - I am trying to save a single worksheet from a workbook into a location of the user's choice. A few questions to this -


i trying save single worksheet workbook location of user's choice. worksheet want save has images change depending on values worksheet inside workbook. code looks

sub saveworksheet()      blah = val(sheet1.combobox1)      if blah = (number)          sheet4.image1.picture = loadpicture("reference.jpg"      end if       **filename = application.getsaveasfilename     application.worksheets.application.saveworkspace (filename)**  end sub 

what have saves whole workbook location of choice, want sheet4 saved pdf location.

like put in comments, there answer question here. repeat answer here, since hadn't been accepted in other question, zemens suggests.

once have selected group of sheets, can use selection

consider:

sub luxation()     thisworkbook.sheets(array("sheet1", "sheet2", "sheet3")).select     selection.exportasfixedformat _         type:=xltypepdf, _         filename:="c:\testfolder\temp.pdf", _         quality:=xlqualitystandard, _         includedocproperties:=true, _         ignoreprintareas:=false, _         openafterpublish:=true end sub 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -