Code:
Private Sub cmdRosenbergElCampo_Click()
If cmdRosenbergElCampo.Caption = "EL-CAMPO" Then
Worksheets("Current").cmdRosenbergElCampo.Caption = "ROSENBERG"
Worksheets("Current").cmdRosenbergElCampo.BackStyle = BackStyleTransparent
Call Macro3
Else
Worksheets("Current").cmdRosenbergElCampo.Caption = "EL-CAMPO"
Worksheets("Current").cmdRosenbergElCampo.BackStyle = BackStyleTransparent
Call Macro4
End If
Worksheets("Current").cmdRosenbergElCampo.BackStyle = BackStyleTransparent
End Sub
Thats the code for the commandbutton that under its properties on the worksheet its set to transparent ( and is transparent) but when its executed it changes to the standard grey color.
This is an activeX control, btw
Here is the other code (for Macro3 listed in the code above):
Code:
Sub Macro3()
' button for ROSENBERG EMPLOYEES
ActiveWindow.ScrollColumn = 1
Dim lCol As Long
lCol = ActiveSheet.UsedRange.Columns.Count
rCol = ActiveSheet.UsedRange.Rows.Count
For Each Cell In Range(Cells(5, 6), Cells(5, lCol))
If Cell = "R" Then Columns(Cell.Column).Hidden = False Else Columns(Cell.Column).Hidden = True
Next
Range(Cells(1, 2), Cells(rCol, lCol)).Interior.Color = xlNone
Range(Cells(1, 2), Cells(rCol, lCol)).Font.Color = vbBlack
Range(Cells(1, 2), Cells(rCol, lCol)).Font.Bold = False
Range(Cells(1, 2), Cells(rCol, lCol)).Borders.Weight = xlThin
Range("B6").Font.Color = &HFF&
Range("B6").Font.Bold = True
Range("B6").Borders.Weight = xlMedium
Range("B2:B4").Font.Color = &HC000&
Range("B2:B4").Font.Bold = True
Range("B2:B4").Borders.Weight = xlThin
Worksheets("Current").cmdRosenbergElCampo.BackStyle = BackStyleTransparent
End Sub
Macro4 (the other event that is linked in the first code) is identical to macro3, btw
I went back in under both codes and added the "BackStyle = BackStyleTransparent" code which had no effect btw.
Is this a known issue, or do I just have something funky in my code that I'm just not seeing?
Thanks
Last edited: