Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA IDE Weirdness....

Hello all,

A little weirdness occurred with my VBA development environment and I was
wondering if it is anything to be concerned about...

I had CommandButton1 on a sheet and a corresponding "Sub
CommandButton1_Click()" routine in VBA. Somehow, the name of the button was
changed to CommandButton2 - not by me, and I'm the only one writing code on
this workbook. Yet the routine's name did not change. Obviously, the
button stopped working. When I went to change it's name back I would
immediately get an error about "Ambiguous Object Name" (or something very
close to that). Ultimately, I had to change the name of the routine.

I scanned the workbook for viruses, and found nothing. Does anyone have any
ideas as to what happened.

Thanks!

Trip



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default VBA IDE Weirdness....

Hello Trip
This error usually occurs when a object name
(/function/macro/variable/etc...) is used twice within a project but
referring to (at least) two different objects.
HTH
Regards
Pascal

"Trip" a écrit dans le message de
...
Hello all,

A little weirdness occurred with my VBA development environment and I was
wondering if it is anything to be concerned about...

I had CommandButton1 on a sheet and a corresponding "Sub
CommandButton1_Click()" routine in VBA. Somehow, the name of the button

was
changed to CommandButton2 - not by me, and I'm the only one writing code

on
this workbook. Yet the routine's name did not change. Obviously, the
button stopped working. When I went to change it's name back I would
immediately get an error about "Ambiguous Object Name" (or something very
close to that). Ultimately, I had to change the name of the routine.

I scanned the workbook for viruses, and found nothing. Does anyone have

any
ideas as to what happened.

Thanks!

Trip





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA IDE Weirdness....

You might have two buttons, one on top of the other. This can happen by
doing a ctrl+Click on the button with a slight movement of the mouse.
Perhaps you were trying to snap the control to align with a cell or size it
maintaining the aspect ration and tried holding down the Ctrl key, then
moved the mouse slightly (creating a copy ), then lined it back up over the
original without realizing you had made a copy.

--
Regards,
Tom Ogilvy

"Trip" wrote in message
...
Hello all,

A little weirdness occurred with my VBA development environment and I was
wondering if it is anything to be concerned about...

I had CommandButton1 on a sheet and a corresponding "Sub
CommandButton1_Click()" routine in VBA. Somehow, the name of the button

was
changed to CommandButton2 - not by me, and I'm the only one writing code

on
this workbook. Yet the routine's name did not change. Obviously, the
button stopped working. When I went to change it's name back I would
immediately get an error about "Ambiguous Object Name" (or something very
close to that). Ultimately, I had to change the name of the routine.

I scanned the workbook for viruses, and found nothing. Does anyone have

any
ideas as to what happened.

Thanks!

Trip





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default VBA IDE Weirdness....

You can tell for sure. Select the user form, then check the entries in
the drop down box at the top of the properties window. All of the
objects are listed, and if you select it in this list, it will be
highlighted in the form (so you can see what it's hiding under.

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

Tom Ogilvy wrote:

You might have two buttons, one on top of the other. This can happen by
doing a ctrl+Click on the button with a slight movement of the mouse.
Perhaps you were trying to snap the control to align with a cell or size it
maintaining the aspect ration and tried holding down the Ctrl key, then
moved the mouse slightly (creating a copy ), then lined it back up over the
original without realizing you had made a copy.


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
Arrow key weirdness Earl Kiosterud Excel Discussion (Misc queries) 3 April 7th 08 03:12 AM
VLOOKUP weirdness Dave Excel Worksheet Functions 2 November 5th 06 03:22 PM
Excel weirdness!!!! MattShoreson Excel Discussion (Misc queries) 5 July 6th 05 01:43 PM
Conditional Sum weirdness . . . WillRn Excel Worksheet Functions 1 February 17th 05 10:46 PM
Charting Weirdness and VBA Markus Grein Excel Programming 0 February 7th 04 06:59 AM


All times are GMT +1. The time now is 04:10 PM.

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"