Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default module related

I have created a module that will handle when a change occurs to the excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the worksheet?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default module related

Sheet1.Combobox1.Value

Worksheets("Sheet1").OleObjects("Combobox1").Objec t.Value

--
Regards,
Tom Ogilvy

"Monique" wrote in message
...
I have created a module that will handle when a change occurs to the excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the

module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the

worksheet?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default module related

What sort of combobox, and where is your module?

If it is a forms combobox, the assigned macro should go in a standard code
module.

If it is a control toolbox combo, you should check it the control's click
event.

--

HTH

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


"Monique" wrote in message
...
I have created a module that will handle when a change occurs to the excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the

module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the

worksheet?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default module related

I have several objects that be changed according to the selection in the
combo box...

Dim mPriceLeft As Integer

mPriceLeft = 39.75

If cmbPriceType.Value = "Restored" Then
lblResPriceType.Top = 235.5
lblResPriceType.Left = 15.75

chkRDPType.Top = 246.75
chkRDPType.Left = mPriceLeft

chkOWSPType.Top = 262.5
chkOWSPType.Left = mPriceLeft

end if
end sub

There are a lot more variables. Is there a similar way than doing the below?

Thanks.

"Tom Ogilvy" wrote:

Sheet1.Combobox1.Value

Worksheets("Sheet1").OleObjects("Combobox1").Objec t.Value

--
Regards,
Tom Ogilvy

"Monique" wrote in message
...
I have created a module that will handle when a change occurs to the excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the

module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the

worksheet?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default module related

It is a control toolbox combo. I just inserted a module. Is this incorrect?

The combo box will effect other objects on the worksheet. The module isn't
reading the combo box so i know it won't read the other objects as well. Is
there a similar way to do this in a module or should i just make it a
procedure for the worksheet location?

"Bob Phillips" wrote:

What sort of combobox, and where is your module?

If it is a forms combobox, the assigned macro should go in a standard code
module.

If it is a control toolbox combo, you should check it the control's click
event.

--

HTH

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


"Monique" wrote in message
...
I have created a module that will handle when a change occurs to the excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the

module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the

worksheet?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default module related

Can you change the location of objects on the sheet without specify the new
location for each one? Probably not. If you are moving them as a group,
you might try group them and moving the group.

--
Regards,
Tom Ogilvy

"Monique" wrote in message
...
I have several objects that be changed according to the selection in the
combo box...

Dim mPriceLeft As Integer

mPriceLeft = 39.75

If cmbPriceType.Value = "Restored" Then
lblResPriceType.Top = 235.5
lblResPriceType.Left = 15.75

chkRDPType.Top = 246.75
chkRDPType.Left = mPriceLeft

chkOWSPType.Top = 262.5
chkOWSPType.Left = mPriceLeft

end if
end sub

There are a lot more variables. Is there a similar way than doing the

below?

Thanks.

"Tom Ogilvy" wrote:

Sheet1.Combobox1.Value

Worksheets("Sheet1").OleObjects("Combobox1").Objec t.Value

--
Regards,
Tom Ogilvy

"Monique" wrote in message
...
I have created a module that will handle when a change occurs to the

excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the

module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the

worksheet?





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default module related

No, you need to tie to the click event. In the controls toolbox, click the
blue-green triangle icon (design mode).

Then double-click the combobox, this will create a template click event. Put
you code in their.

Back on the worksheet, take it out of design mode.

--

HTH

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


"Monique" wrote in message
...
It is a control toolbox combo. I just inserted a module. Is this

incorrect?

The combo box will effect other objects on the worksheet. The module isn't
reading the combo box so i know it won't read the other objects as well.

Is
there a similar way to do this in a module or should i just make it a
procedure for the worksheet location?

"Bob Phillips" wrote:

What sort of combobox, and where is your module?

If it is a forms combobox, the assigned macro should go in a standard

code
module.

If it is a control toolbox combo, you should check it the control's

click
event.

--

HTH

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


"Monique" wrote in message
...
I have created a module that will handle when a change occurs to the

excel
worksheet in a combo box.

Depending on the selection value in the combo box, it will go to the

module
and change the format of the worksheet.

The problem is the module is not recognizing the combo box.

How can the module recognize the objects that are related to the

worksheet?





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
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
Calls from sheet module to ThisWorkbook module quartz[_2_] Excel Programming 2 June 23rd 05 03:37 PM
arrays - module to module mike Excel Programming 3 February 25th 04 08:56 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 07:47 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"