Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Referencing a ComboBox control from a Workbook Object?

Hi Everybody,

I have a ComboBox control on a Worksheet. From the code behind of the
Worksheet I am able reference it and alter it's properties

i.e. MyComboBox.Text = "Hello"

My goal is to reference that same control from the code behind of the
Workbook instead?

i.e. ThisWorkbook.Worksheets("Sheet1"). ?

Thanks for any help!
Sam

P.S. ThisWorkbook.Worksheets("Sheet1").MyComboBox.Text doesn't work?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Referencing a ComboBox control from a Workbook Object?

See the message thread 5 root posts above this one with subject: editing control/form objects on a worksheet
by: Ricky M. Medley....
Is searching for very similair answer. Can watch there also for any responses.

regards
ricky


"debartsa" wrote in message ...
Hi Everybody,

I have a ComboBox control on a Worksheet. From the code behind of the
Worksheet I am able reference it and alter it's properties

i.e. MyComboBox.Text = "Hello"

My goal is to reference that same control from the code behind of the
Workbook instead?

i.e. ThisWorkbook.Worksheets("Sheet1"). ?

Thanks for any help!
Sam

P.S. ThisWorkbook.Worksheets("Sheet1").MyComboBox.Text doesn't work?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Referencing a ComboBox control from a Workbook Object?

Private Sub Workbook_SheetActivate(ByVal Sh As Object)

If Sh.Name = "Sheet2" Then
ThisWorkbook.Worksheets("Sheet1").MyCombobox.Text _
= Format(Time, "hh:mm:ss.00")
End If
End Sub

worked fine for me as an example of using that notation in th eThisworkbook
event.

--
Regards,
Tom Ogilvy

"Ricky M. Medley" wrote in message
...
See the message thread 5 root posts above this one with subject: editing
control/form objects on a worksheet
by: Ricky M. Medley....
Is searching for very similair answer. Can watch there also for any
responses.

regards
ricky

"debartsa" wrote in message
...
Hi Everybody,

I have a ComboBox control on a Worksheet. From the code behind of the
Worksheet I am able reference it and alter it's properties

i.e. MyComboBox.Text = "Hello"

My goal is to reference that same control from the code behind of the
Workbook instead?

i.e. ThisWorkbook.Worksheets("Sheet1"). ?

Thanks for any help!
Sam

P.S. ThisWorkbook.Worksheets("Sheet1").MyComboBox.Text doesn't work?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Referencing a ComboBox control from a Workbook Object?

to all that review....
one of my errors was to use activeworkbook.worksheets....etc. which yields a
compile error

thanks tom


"Tom Ogilvy" wrote in message
...
Private Sub Workbook_SheetActivate(ByVal Sh As Object)

If Sh.Name = "Sheet2" Then
ThisWorkbook.Worksheets("Sheet1").MyCombobox.Text _
= Format(Time, "hh:mm:ss.00")
End If
End Sub

worked fine for me as an example of using that notation in th

eThisworkbook
event.

--
Regards,
Tom Ogilvy

"Ricky M. Medley" wrote in message
...
See the message thread 5 root posts above this one with subject: editing
control/form objects on a worksheet
by: Ricky M. Medley....
Is searching for very similair answer. Can watch there also for any
responses.

regards
ricky

"debartsa" wrote in message
...
Hi Everybody,

I have a ComboBox control on a Worksheet. From the code behind of the
Worksheet I am able reference it and alter it's properties

i.e. MyComboBox.Text = "Hello"

My goal is to reference that same control from the code behind of the
Workbook instead?

i.e. ThisWorkbook.Worksheets("Sheet1"). ?

Thanks for any help!
Sam

P.S. ThisWorkbook.Worksheets("Sheet1").MyComboBox.Text doesn't work?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
form control combobox Gail Excel Discussion (Misc queries) 7 October 2nd 09 07:27 PM
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
Control ToolBox ComboBox Steve D Excel Discussion (Misc queries) 1 July 1st 09 05:17 PM
HELP PLEASE..Inserting combobox (ActiveX control) makes workbook c Inquiringmind Excel Discussion (Misc queries) 0 February 10th 07 11:01 AM
How to pass valve in combobox object to cell chanon Excel Programming 3 October 15th 03 04:25 AM


All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"