ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving as Web Page (https://www.excelbanter.com/excel-programming/358607-saving-web-page.html)

Brian Matlack[_65_]

Saving as Web Page
 

Hi!
Is there a code that will "Save as Web Page", the print area of the
currently active worksheet and give it a file name based on referencing
a cell within the currently active worksheet?
I've been searching for this for some time and cannot seem to find
anything. Perhaps I'm just looking in the wrong place!
Thanks for any help or advise!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=531945


Tom Ogilvy

Saving as Web Page
 
Dim rng as Range
set rng = Activesheet.Names("Print_Area")
activesheet.copy
activesheet.clearcontents
rng.copy Activesheet.Range(rng.Address).Paste

activeworkbook.SaveAs "C:\Myfolder\ & rng.parent.Range("B9").text & .html",
xlHtml

might get you started.

--
Regards,
Tom Ogilvy


"Brian Matlack" wrote:


Hi!
Is there a code that will "Save as Web Page", the print area of the
currently active worksheet and give it a file name based on referencing
a cell within the currently active worksheet?
I've been searching for this for some time and cannot seem to find
anything. Perhaps I'm just looking in the wrong place!
Thanks for any help or advise!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=531945



Brian Matlack[_66_]

Saving as Web Page
 

Thanks Tom!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=531945



All times are GMT +1. The time now is 03:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com