VBA coding to export multiple calcualtion sheets as webpages
I am not sure when to put it in your loop but the following code grabs the
text from "a1" and sticks it into a string with the Month and Day all
separated with Underscores, and saves it as month_day_reference.html
I used underscores because filenames don't work well with slashes common in
dates.
Dim c_date
Range("a1").Select
c_date = Month(Now) & "_" & Day(Now) & "_ " & Selection.Formula
ActiveWorkbook.SaveAs Filename:= _
c_date, FileFormat:=xlHtml _
, ReadOnlyRecommended:=False, CreateBackup:=False
" wrote:
I have created a very simple code that right now runs through a
list of references, pulls the relevant information into our template
(ie, calculate) and prints. I need to revise (overhaul) the code so
that it does a similar task but now saves each calcualtion as a web
page named for the reference and the date it was exported. Can someone
please help me get a shell going?
Thanks,
ko
(my uber-simple code is below, it won't help probably)
Sub PRINT_ALL()
For Each c In Range("List4")
Range("A3").Value = c.Value
Calculate
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Next c
End Sub
|