PC Review


Reply
Thread Tools Rate Thread

Controls on Chart Forget assigned Macros.

 
 
Jahanzaib
Guest
Posts: n/a
 
      3rd Dec 2007
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
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      3rd Dec 2007
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" <(E-Mail Removed)> wrote in message
news:487AA0DB-6BA8-494F-A409-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Jahanzaib
Guest
Posts: n/a
 
      4th Dec 2007
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" <(E-Mail Removed)> wrote in message
> news:487AA0DB-6BA8-494F-A409-(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      4th Dec 2007
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" <(E-Mail Removed)> wrote in message
news:187888D4-F656-4E53-BCB2-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:487AA0DB-6BA8-494F-A409-(E-Mail Removed)...
>> > 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

>>
>>
>>



 
Reply With Quote
 
Jahanzaib
Guest
Posts: n/a
 
      5th Dec 2007
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" <(E-Mail Removed)> wrote in message
> news:187888D4-F656-4E53-BCB2-(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> >> news:487AA0DB-6BA8-494F-A409-(E-Mail Removed)...
> >> > 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
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      5th Dec 2007
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" <(E-Mail Removed)> wrote in message
news:95A748E3-959C-404C-86EF-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:187888D4-F656-4E53-BCB2-(E-Mail Removed)...
>> > 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" <(E-Mail Removed)> wrote in message
>> >> news:487AA0DB-6BA8-494F-A409-(E-Mail Removed)...
>> >> > 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
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros assigned to Menu Items Techtrainer Microsoft Excel Programming 2 17th Sep 2008 03:42 PM
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros =?Utf-8?B?SmF5?= Microsoft Excel Programming 1 30th Mar 2007 12:02 AM
Command/Menu bar & assigned macros RITCHI Microsoft Excel Programming 1 30th Jan 2007 12:01 AM
What macros are assigned to icons? Terry Pinnell Microsoft Excel Misc 3 28th Feb 2006 07:31 AM
macros assigned to buttons Greegan Microsoft Excel Worksheet Functions 1 2nd Oct 2004 04:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:06 AM.