Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Sub SaveTempletAsWebpage() Range("A5:Q70").Select With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _ "C:\Test\Page.htm" _ , "sheet1", "$A$5:$Q$70", xlHtmlStatic, "Book1_16704", "" _ ) .Publish (True) .AutoRepublish = False End With ChDir _ "C:\Test" End Sub I would like to save this web page with value of the active cell in sheet2 which is B1 Thanks in advance Dave |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oops
Name the web page the as the value of the cell. Thanks in advance Dave "DaveM" wrote in message . uk... Hi Sub SaveTempletAsWebpage() Range("A5:Q70").Select With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _ "C:\Test\Page.htm" _ , "sheet1", "$A$5:$Q$70", xlHtmlStatic, "Book1_16704", "" _ ) .Publish (True) .AutoRepublish = False End With ChDir _ "C:\Test" End Sub I would like to save this web page with value of the active cell in sheet2 which is B1 Thanks in advance Dave |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Untested:
With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _ "C:\Test\" & Sheet2.Range("B1").Value, _ "sheet1", "$A$5:$Q$70", xlHtmlStatic, "Book1_16704", "") I'm using the sheet2 codename - if you want to use the tab name it would be Activeworkbook.sheets("Sheet2").Range("B1").value Tim "DaveM" wrote in message . uk... Hi Sub SaveTempletAsWebpage() Range("A5:Q70").Select With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _ "C:\Test\Page.htm" _ , "sheet1", "$A$5:$Q$70", xlHtmlStatic, "Book1_16704", "" _ ) .Publish (True) .AutoRepublish = False End With ChDir _ "C:\Test" End Sub I would like to save this web page with value of the active cell in sheet2 which is B1 Thanks in advance Dave |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tim
Works a treat All the best Dave "Tim Williams" <timjwilliams at gmail dot com wrote in message ... Untested: With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _ "C:\Test\" & Sheet2.Range("B1").Value, _ "sheet1", "$A$5:$Q$70", xlHtmlStatic, "Book1_16704", "") I'm using the sheet2 codename - if you want to use the tab name it would be Activeworkbook.sheets("Sheet2").Range("B1").value Tim "DaveM" wrote in message . uk... Hi Sub SaveTempletAsWebpage() Range("A5:Q70").Select With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _ "C:\Test\Page.htm" _ , "sheet1", "$A$5:$Q$70", xlHtmlStatic, "Book1_16704", "" _ ) .Publish (True) .AutoRepublish = False End With ChDir _ "C:\Test" End Sub I would like to save this web page with value of the active cell in sheet2 which is B1 Thanks in advance Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
how do i insert page number on active cell? | Excel Discussion (Misc queries) | |||
save worksheet as per the active cell | Excel Programming | |||
How to save a workbook to an active Web Page? | Excel Discussion (Misc queries) | |||
Screen does not scroll as active cell moves down the page | Excel Discussion (Misc queries) |