ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Controls on Chart Forget assigned Macros. (https://www.excelbanter.com/excel-programming/402112-controls-chart-forget-assigned-macros.html)

Jahanzaib

Controls on Chart Forget assigned Macros.
 
Hello,

I have a combo box on my chart.
I have writtten a (Sub) procedure in a class module.
ComboBox calls the Sub A.
Works Accurately, but when I reopen my file, code does not run by ComboBox
and I have to re-assign Sub A to the combo box.

How can I resolve this??

JB

Jahanzaib

Controls on Chart Forget assigned Macros.
 
Thanks for Reply Mr. Peltier,

I have moved code to the regular module.
Problem did not fix.

JB


"Jon Peltier" wrote:

The combo box should be assigned to a procedure in a regular code module,
unless you have defined a class module to capture ComboBox events, in which
case you need to instantiate the combo box as an instance of the class when
the workbook opens.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Hello,

I have a combo box on my chart.
I have writtten a (Sub) procedure in a class module.
ComboBox calls the Sub A.
Works Accurately, but when I reopen my file, code does not run by ComboBox
and I have to re-assign Sub A to the combo box.

How can I resolve this??

JB





Jon Peltier

Controls on Chart Forget assigned Macros.
 
After assigning the macro to the combobox, has the file been saved?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Thanks for Reply Mr. Peltier,

I have moved code to the regular module.
Problem did not fix.

JB


"Jon Peltier" wrote:

The combo box should be assigned to a procedure in a regular code module,
unless you have defined a class module to capture ComboBox events, in
which
case you need to instantiate the combo box as an instance of the class
when
the workbook opens.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Hello,

I have a combo box on my chart.
I have writtten a (Sub) procedure in a class module.
ComboBox calls the Sub A.
Works Accurately, but when I reopen my file, code does not run by
ComboBox
and I have to re-assign Sub A to the combo box.

How can I resolve this??

JB







Jahanzaib

Controls on Chart Forget assigned Macros.
 
Hi,
Yes!
Does it has any connection with Protect-Unprotect Sheet?
JB

"Jon Peltier" wrote:

After assigning the macro to the combobox, has the file been saved?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Thanks for Reply Mr. Peltier,

I have moved code to the regular module.
Problem did not fix.

JB


"Jon Peltier" wrote:

The combo box should be assigned to a procedure in a regular code module,
unless you have defined a class module to capture ComboBox events, in
which
case you need to instantiate the combo box as an instance of the class
when
the workbook opens.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Hello,

I have a combo box on my chart.
I have writtten a (Sub) procedure in a class module.
ComboBox calls the Sub A.
Works Accurately, but when I reopen my file, code does not run by
ComboBox
and I have to re-assign Sub A to the combo box.

How can I resolve this??

JB







Jon Peltier

Controls on Chart Forget assigned Macros.
 
I don't think so, but if the control (or rather its shape container) is
locked, then maybe you cannot press it to activate the macro. When you right
click to assign a macro, is any macro already selected for the control? It's
a Forms menu control, right?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Hi,
Yes!
Does it has any connection with Protect-Unprotect Sheet?
JB

"Jon Peltier" wrote:

After assigning the macro to the combobox, has the file been saved?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Thanks for Reply Mr. Peltier,

I have moved code to the regular module.
Problem did not fix.

JB


"Jon Peltier" wrote:

The combo box should be assigned to a procedure in a regular code
module,
unless you have defined a class module to capture ComboBox events, in
which
case you need to instantiate the combo box as an instance of the class
when
the workbook opens.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jahanzaib" wrote in message
...
Hello,

I have a combo box on my chart.
I have writtten a (Sub) procedure in a class module.
ComboBox calls the Sub A.
Works Accurately, but when I reopen my file, code does not run by
ComboBox
and I have to re-assign Sub A to the combo box.

How can I resolve this??

JB










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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com