kemperohlmeyer
Board Regular
- Joined
- Oct 4, 2006
- Messages
- 73
For some reason this code worked perfectly yesterday, yet today i get an error stating "Object Variable or With Block Variable not set". When i try to debug it goes to the FileName = range("a18") line. Can someone help shed some light?
thanks,
ko
Dim FileName As Range
Dim c As Range
Sub SaveAsWebPage()
' A macro that saves the pre-defined area as a webpage
' By Kemper Ohlmeyer 10/5/2006
For Each c In Range("List3")
Range("A3").Value = c.Value
Calculate
FileName = Range("a18")
Range("A1:T44").Select
With ActiveWorkbook.PublishObjects("08 - Snapshot info - current managers_7205")
.HtmlType = xlHtmlStatic
.FileName = FileName
.Publish (False)
.AutoRepublish = False
End With
ChDir "P:\Portfolio Mgmt - Due Diligence\WG new\Coded Spreadsheet Templates\Snapshot"
Next c
End Sub
thanks,
ko
Dim FileName As Range
Dim c As Range
Sub SaveAsWebPage()
' A macro that saves the pre-defined area as a webpage
' By Kemper Ohlmeyer 10/5/2006
For Each c In Range("List3")
Range("A3").Value = c.Value
Calculate
FileName = Range("a18")
Range("A1:T44").Select
With ActiveWorkbook.PublishObjects("08 - Snapshot info - current managers_7205")
.HtmlType = xlHtmlStatic
.FileName = FileName
.Publish (False)
.AutoRepublish = False
End With
ChDir "P:\Portfolio Mgmt - Due Diligence\WG new\Coded Spreadsheet Templates\Snapshot"
Next c
End Sub