PC Review


Reply
Thread Tools Rate Thread

Can't find my VBA code

 
 
Bev Kaufman
Guest
Posts: n/a
 
      1st Apr 2008
I added a button, btnPrint, to my spreadsheet, and wrote some code. The
next day, I wanted to make changes to the code, and I could not find it. I
was able to open the VBA window, but the code was not there, nor did I see
any reference to btnPrint. The button works, so the code must be in there
somewhere. How do I get to it?
 
Reply With Quote
 
 
 
 
Michael
Guest
Posts: n/a
 
      1st Apr 2008
If it is a control button Right Click on the button and then select view
Code. You may have to click on the Design button first in order to allow you
to right click on it.
If it is a form and not a control button, then right click on it and select
assign macro, then select edit or step in.


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Bev Kaufman" wrote:

> I added a button, btnPrint, to my spreadsheet, and wrote some code. The
> next day, I wanted to make changes to the code, and I could not find it. I
> was able to open the VBA window, but the code was not there, nor did I see
> any reference to btnPrint. The button works, so the code must be in there
> somewhere. How do I get to it?

 
Reply With Quote
 
Bev Kaufman
Guest
Posts: n/a
 
      1st Apr 2008
I did right click on the button and then press the View Code button. This
brought up the VBA code window, but the code was not there. I could see the
four sheets plus another called This Worksheet, but there was no code for
btnPrint, nor was that control - or any control - visible in any of the
dropdowns.
I am certain that this was not a macro I created, which I believe involves
the recording of key strokes. I used the Printout command.

BTW, this is an old version of Excel, 2000. If that has anything to do with
the problem.


"Michael" wrote:

> If it is a control button Right Click on the button and then select view
> Code. You may have to click on the Design button first in order to allow you
> to right click on it.
> If it is a form and not a control button, then right click on it and select
> assign macro, then select edit or step in.
>
>
> --
> If this posting was helpful, please click on the Yes button.
> Regards,
>
> Michael Arch.
>
>
>
>
> "Bev Kaufman" wrote:
>
> > I added a button, btnPrint, to my spreadsheet, and wrote some code. The
> > next day, I wanted to make changes to the code, and I could not find it. I
> > was able to open the VBA window, but the code was not there, nor did I see
> > any reference to btnPrint. The button works, so the code must be in there
> > somewhere. How do I get to it?

 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      1st Apr 2008
Try this:
In the VBA code Window from the Main Menu Click on View -> Object Browser
and on the pop up window where it reads All Libraries Select the Name of the
project you are working on(this could be your file Name) and on the left
bottom section you will see the classes, click on the class that shows the
sheet name where you placed the button, and on your right you will see the
Members of that Class your code should be listed there under btnPrint or
check all of those that have a green icon on them.
Hope this helps.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Bev Kaufman" wrote:

> I did right click on the button and then press the View Code button. This
> brought up the VBA code window, but the code was not there. I could see the
> four sheets plus another called This Worksheet, but there was no code for
> btnPrint, nor was that control - or any control - visible in any of the
> dropdowns.
> I am certain that this was not a macro I created, which I believe involves
> the recording of key strokes. I used the Printout command.
>
> BTW, this is an old version of Excel, 2000. If that has anything to do with
> the problem.
>
>
> "Michael" wrote:
>
> > If it is a control button Right Click on the button and then select view
> > Code. You may have to click on the Design button first in order to allow you
> > to right click on it.
> > If it is a form and not a control button, then right click on it and select
> > assign macro, then select edit or step in.
> >
> >
> > --
> > If this posting was helpful, please click on the Yes button.
> > Regards,
> >
> > Michael Arch.
> >
> >
> >
> >
> > "Bev Kaufman" wrote:
> >
> > > I added a button, btnPrint, to my spreadsheet, and wrote some code. The
> > > next day, I wanted to make changes to the code, and I could not find it. I
> > > was able to open the VBA window, but the code was not there, nor did I see
> > > any reference to btnPrint. The button works, so the code must be in there
> > > somewhere. How do I get to it?

 
Reply With Quote
 
Bev Kaufman
Guest
Posts: n/a
 
      2nd Apr 2008
That did the trick. Thank you

"Michael" wrote:

> Try this:
> In the VBA code Window from the Main Menu Click on View -> Object Browser
> and on the pop up window where it reads All Libraries Select the Name of the
> project you are working on(this could be your file Name) and on the left
> bottom section you will see the classes, click on the class that shows the
> sheet name where you placed the button, and on your right you will see the
> Members of that Class your code should be listed there under btnPrint or
> check all of those that have a green icon on them.
> Hope this helps.
>
> --
> If this posting was helpful, please click on the Yes button.
> Regards,
>
> Michael Arch.
>
>
>
>
> "Bev Kaufman" wrote:
>
> > I did right click on the button and then press the View Code button. This
> > brought up the VBA code window, but the code was not there. I could see the
> > four sheets plus another called This Worksheet, but there was no code for
> > btnPrint, nor was that control - or any control - visible in any of the
> > dropdowns.
> > I am certain that this was not a macro I created, which I believe involves
> > the recording of key strokes. I used the Printout command.
> >
> > BTW, this is an old version of Excel, 2000. If that has anything to do with
> > the problem.
> >
> >
> > "Michael" wrote:
> >
> > > If it is a control button Right Click on the button and then select view
> > > Code. You may have to click on the Design button first in order to allow you
> > > to right click on it.
> > > If it is a form and not a control button, then right click on it and select
> > > assign macro, then select edit or step in.
> > >
> > >
> > > --
> > > If this posting was helpful, please click on the Yes button.
> > > Regards,
> > >
> > > Michael Arch.
> > >
> > >
> > >
> > >
> > > "Bev Kaufman" wrote:
> > >
> > > > I added a button, btnPrint, to my spreadsheet, and wrote some code. The
> > > > next day, I wanted to make changes to the code, and I could not find it. I
> > > > was able to open the VBA window, but the code was not there, nor did I see
> > > > any reference to btnPrint. The button works, so the code must be in there
> > > > somewhere. How do I get to it?

 
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
Help to find a code MAX Microsoft Excel Programming 1 1st May 2009 06:58 PM
can't find any vba code tregarva Microsoft Powerpoint 3 21st Jan 2009 11:11 PM
Find last row code =?Utf-8?B?TWlrZSBNaWxtb2U=?= Microsoft Excel Misc 2 11th Jun 2007 08:48 PM
I can find it, why can't my code? =?Utf-8?B?UGF1bE5hdWRl?= Microsoft ADO .NET 6 21st Oct 2005 08:41 AM
Re: Find Code Bob Phillips Microsoft Excel Programming 0 25th Jul 2003 01:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:44 PM.