Hi all,
I am currently trying to build a Excel dashboard where I use some visual basic codes.
The code is supposed to visualise a infobox when one click on a info button. The VB code is built (hopefully) in such a fashion that it is easy to scale throughout the dashboard to enhance the experience.
When I click on the info button the sysem error show on picture pops-up.
This is the VB code if uses:
----------
Function Change_Info_Box_Visibility(Info_Button As Object, Info_Box As Object, Visible As Boolean)
If Visible = True Then
Info_Button_Inactive.Fill.ForeColor.RGB = RGB(255, 255, 0)
Info_Box.Visible = True
Else
Info_Button_Inactive.Fill.ForeColor.RGB = RGB(255, 255, 255)
Info_Box.Visible = False
End If
End Function
Sub Change_Info_Box_brand_Visibility()
With ActiveSheet
If .Shapes(“Info_Button_Brand”).Fill.ForeColor.RGB = RGB(255, 255, 255) Then
Call Change_Info_Box_Visibility(.Shapes(“Info_Button_Brand”), .Shapes(“Info_Box_brand”), True)
Else
Call Change_Info_Box_Visibility(.Shapes(“Info_Button_Brand”), .Shapes(“Info_Box_brand”), False)
End If
End With
End Sub
----------
Does anyone have any suggestions on how I could solve this?
Best regards
Roar Thorvaldsen
Windows 10, O365, VB applications 7.1