Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
galimi
 
Posts: n/a
Default Save as .htm with filename from cell

As long as the values in the cell do not contain forbidden characters, you
could simply reference the cell when saving the file using
range("cell_containing_name").value
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


" wrote:

I have a macro to save a sheet as an htm file. I can specify a name
for the file. Is there a way to use the contents of a cell for the
file name? Thanks for any and all help.



  #2   Report Post  
galimi
 
Posts: n/a
Default

Change the following line

"C:\Documents and Settings\HP_Administrator\Desktop\Copy of
cooter\calhDATE.htm", "web (2)", "", xlHtmlStatic, "horses_17286", "")

"C:\Documents and Settings\HP_Administrator\Desktop\Copy of cooter\" &
range("N131").value, "web (2)", "", xlHtmlStatic, "horses_17286", "")


--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


" wrote:

What about publishing just one sheet as an htm file. My macro looks
like this now. I used Record Macro to get it. I don't know what all
those words mean in the macro. But I would like to be able to use the
contents of cell N131 as the filename. Thanks.

Option Private Module
Sub ExportFinal()
'
' ExportFinal Macro
' Macro recorded 4/29/2005 by
'
With ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
"C:\Documents and Settings\HP_Administrator\Desktop\Copy of cooter\calhDATE.htm" _
, "web (2)", "", xlHtmlStatic, "horses_17286", "")
.Publish (True)
.AutoRepublish = False
End With

Sheets("web (2)").Select
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
Sheets("CALENDAR").Select

End Sub


On Thu, 12 May 2005 19:45:06 -0700, galimi
wrote:

As long as the values in the cell do not contain forbidden characters, you
could simply reference the cell when saving the file using
range("cell_containing_name").value
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758


" wrote:

I have a macro to save a sheet as an htm file. I can specify a name
for the file. Is there a way to use the contents of a cell for the
file name? Thanks for any and all help.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell addressing using the content of another cell. De Jandon Excel Worksheet Functions 5 April 1st 05 10:59 PM
How to save Excel macro using name contained in cell? CG Excel Worksheet Functions 1 February 3rd 05 03:51 PM
How can I make Excel Files save as the text appers in a cell, can. I khan Excel Discussion (Misc queries) 1 February 1st 05 07:34 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
How do i auto rename a worksheet to be the same filename as save f Catherine Excel Worksheet Functions 1 December 1st 04 10:17 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"