Hi,

I have a status bar on my form which I want to display a different icon or no icon at all depending on which page is in the web browser on the form (there are only three possible options).

I am using the following code:

'Ensure that status bar panels display the correct _
information
If wbrReport.LocationURL = _
"G:\Wiz Add Ins\Energy Client\HTML\Statement.htm" Then
sbrReport.Panels(1).Picture = LoadPicture _
("G:\Wiz Add Ins\Energy Client\Images\SStatement.ico")
sbrReport.Panels(1).Text = "Statement view"
ElseIf wbrReport.LocationURL = _
"G:\Wiz Add Ins\Energy Client\HTML\Chart.htm" Then
sbrReport.Panels(1).Picture = LoadPicture _
("G:\Wiz Add Ins\Energy Client\Images\SChart.ico")
sbrReport.Panels(1).Text = "Chart view"
Else
sbrReport.Panels(1).Picture = (None)
sbrReport.Panels(1).Text = ""
End If
sbrReport.Panels(2).Text = _
CStr(Format(frmMain.datReportDate, "Long Date"))

VB does not like the statement:

sbrReport.Panels(1).Picture = (None)

I've tried specifying the property as a string:

"(None)" / "None".

I've also tried setting the Type property of the Picture Object:

sbrReport.Panels(1).Picture.Type = vbPicTypeNone

None of this is working. I just want to remove the pictures from the panels when they are not relevant.

Does anyone know how to do this?

Any suggestions would be greatly appreciated.

Best regards,

Rob Brown.