Hi Guys,
400:
Sheets("html").Select
Range("C1").Select
mylastrow = Range("c65536").End(xlUp).Row
Range("C1:I" & mylastrow + 4).Select
FNAME = store & dept & "s"
With ActiveWorkbook.PublishObjects("supsales_27219")
.Filename = "M:\reports\HTM\" & FNAME & ".htm"
.Publish (False)
End With
500:
Next k
600:
Next i
End Sub
The above code is only writing 12 lines to the htm file when there are mores lines?
A little stumped as to whay as I pickup the last row in a variable and if I stop the code I can see all the lines I've captured.
I just recorded this macro to test further.
Range("C1:G27").Select
ActiveWorkbook.PublishObjects.Add(xlSourceRange, "M:\reports\htm\Page.htm", _
"html", "$C$1:$H$27", xlHtmlStatic, "supsales_18493", "").Publish (True)
Range("C10").Select
I have tried to modify to below code with no luck.
How can I get it to work successfully and also include the mylastrow in the
highlighted line in an effort to make more robust.
mylastrow = Range("c65536").End(xlUp).Row
Range("C1:H" & mylastrow + 4).Select
ActiveWorkbook.PublishObjects.Add(xlSourceRange, "M:\reports\htm\Page.htm", _
"html", "$C$1:$H$27", xlHtmlStatic, "supsales_18493", "").Publish (True)
Range("C10").Select
Any help is apprecated.
Tassie
400:
Sheets("html").Select
Range("C1").Select
mylastrow = Range("c65536").End(xlUp).Row
Range("C1:I" & mylastrow + 4).Select
FNAME = store & dept & "s"
With ActiveWorkbook.PublishObjects("supsales_27219")
.Filename = "M:\reports\HTM\" & FNAME & ".htm"
.Publish (False)
End With
500:
Next k
600:
Next i
End Sub
The above code is only writing 12 lines to the htm file when there are mores lines?
A little stumped as to whay as I pickup the last row in a variable and if I stop the code I can see all the lines I've captured.
I just recorded this macro to test further.
Range("C1:G27").Select
ActiveWorkbook.PublishObjects.Add(xlSourceRange, "M:\reports\htm\Page.htm", _
"html", "$C$1:$H$27", xlHtmlStatic, "supsales_18493", "").Publish (True)
Range("C10").Select
I have tried to modify to below code with no luck.
How can I get it to work successfully and also include the mylastrow in the
highlighted line in an effort to make more robust.
mylastrow = Range("c65536").End(xlUp).Row
Range("C1:H" & mylastrow + 4).Select
ActiveWorkbook.PublishObjects.Add(xlSourceRange, "M:\reports\htm\Page.htm", _
"html", "$C$1:$H$27", xlHtmlStatic, "supsales_18493", "").Publish (True)
Range("C10").Select
Any help is apprecated.
Tassie