View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Adding Embedded OLE Objects on a Spread Sheet

Is this pre or post my response?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"James McDowell" wrote in message
...
I also need to know how to write it into the VBA so as i add more

checkboxes
as they are needed I can have the code executed. Sort of like an

..OnAction
command.

Thank you,
James McDowell

"James McDowell" wrote:

Hey, this is my first posting so bear with me...
I have embedded several checkboxes on a spread sheet and i wish to write
code for the change event, but i can not figure how to get to it. I

created
the checkboxes through code:
MySheet.OLEObjects.Add ("Forms.CheckBox.1")

Set myOLEObject = MySheet.OLEObjects.Item(xx)

myOLEObject.Name = "wkCheck" & x

myOLEObject.Activate
myOLEObject.Left = ActiveCell.Left
myOLEObject.Top = ActiveCell.Top
myOLEObject.Height = ActiveCell.RowHeight
myOLEObject.Width = ActiveCell.Width
myOLEObject.Object.Caption = ""

How can i write into the VBA the change event code? I have played with

VBE
before, but am not too strong in that area.

Please help. I want to kick off a query when the check box is changed

to
true.

Thank you,
James McDowell