View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Transparency Discrepency

I've never been able to make OLEObjects permanently transparent, either
manually (via properties) or programmatically.

The object might appear transparent after setting .BackStyle =
fmBackStyleTransparent but it reverts to opaque as soon as clicked with
mouse and/or various other actions.

Regards,
Peter T

"Quahaug" wrote in message
ps.com...
There's a discrepency that I can't figure out. When I create a
commandbutton at design time and change the BackStyle property to
fmBackStyleTransparent, the underlying excel cell shows through.
However, when I do the same thing at run time, the underlying excel
cell does not show through. What is the difference and how can I
correct it to get the underlying excel cells to show through with
runtime creation of commandbuttons?

Here's a piece of my runtime code:

[snip]

Dim TeamCB(1 To 2, 1 To 32) As OLEObject

[snip]

Set TeamCB(1, I) = Worksheets(PredictSheet).OLEObjects. _
Add("forms.CommandButton.1")

With TeamCB(1, I)
.Object.BackColor = &HFFFFFF
.Object.AutoSize = False
.Object.BackStyle = fmBackStyleTransparent
.Height = TeamCBHeight
.Width = TeamCBWidth
.Top = StPopTopBase + (StPopTopSize * I)
.Left = StPopVPLeft
.Object.Caption = ""
End With

[snip]

Thanks for any and all help you can give me.

Quahaug