Freeze panes in Web page

wyeah

Board Regular
Joined
Jun 23, 2003
Messages
92
Excel 2010 - Windows XP

I have an Excel spreadsheet that I am saving as html. When I do the "Frozen" columns and rows are not frozen any more. Is there a way to keep these columns and rows frozen..

Below is the VBA I am uing to do this.

Sub Update_HTML()
'
' Update_HTML Macro
' Macro to save HTML file
'

Set objFSO = CreateObject("Scripting.FileSystemObject")
'Delete the old HTML file if it exist.
If objFSO.FileExists("\\usmmaw01\wwwroot\Applications\RFS_Schedule\Priority_List.mht") Then
objFSO.Deletefile ("\\usmmaw01\wwwroot\Applications\RFS_Schedule\Priority_List.mht")
End If
'Save the new HTML file.
With Sheets("MASTERDATA").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Current").Select
Cells.Select
Selection.Font.Size = 8
Cells.EntireRow.AutoFit
Dim sh As Worksheet
For Each sh In Worksheets
If sh.Name <> "Current" Then sh.Visible = xlSheetHidden
Next

End With

Dim shu As Worksheet
For Each shu In Worksheets
If shu.Name = "Week 1" Then shu.Visible = True

Next
Sheets("Week 1").Select
Cells.Select
Selection.Font.Size = 8
Cells.EntireRow.AutoFit

Sheets("Current").Select


With ActiveWorkbook.PublishObjects.Add(xlSourceWorkbook, _
"\\usmmaw01\wwwroot\Applications\RFS_Schedule\Priority_List", "Schedule", "", xlHtmlStatic, _
"Converting Morning Report AB hourly_15241", "")
.Publish (True)
.AutoRepublish = False

End With

End Sub


Thanks
Alan
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top