Olympian24
07-19-2011, 06:59 AM
Hi there i am pretty new to using VBA i have a spreadsheet at work which has a whole lot of tool kits. each tool kit is a range of cells and i want to be able to use a button to automatically publish these defined names to single web pages, . basically i will have a list of the names im just having a problem looping i cant get it to look at the name go publish it then go to the nexxt one in the list.. i hope im making sense..
Here is the code i have at the moment
Public Sub CommandButton1_Click()
Range("AB9").Select
Do While ActiveCell.Value <> ""
publishing
Loop
MsgBox "Done"
End Sub
Public Sub publishing()
Dim NewName As String
ISet = Sheet2.Cells(9, 28).Value
NewName = "c:\insu\" & ISet & ".htm"
Application.Goto Reference:=ISet
ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
NewName, "", ISet, xlHtmlStatic, "Insulation Sets_28198", ""). _
Publish (True)
End Sub
hope someone knows wat im trying to do
Here is the code i have at the moment
Public Sub CommandButton1_Click()
Range("AB9").Select
Do While ActiveCell.Value <> ""
publishing
Loop
MsgBox "Done"
End Sub
Public Sub publishing()
Dim NewName As String
ISet = Sheet2.Cells(9, 28).Value
NewName = "c:\insu\" & ISet & ".htm"
Application.Goto Reference:=ISet
ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
NewName, "", ISet, xlHtmlStatic, "Insulation Sets_28198", ""). _
Publish (True)
End Sub
hope someone knows wat im trying to do