-
2
- #1
TomBarsh
Structural
- Jun 20, 2002
- 1,003
I have been using Excel since Excel 3.0 with the old xlm macro language. Not that I consider myself an expert on Excel by any means, just a good journeyman.
For entertainment, here are a few of the things that have driven me batty with Excel over time. No telling how many hours were expended trying to resolve each of these.
1- Some time back I had a VBA routine to "register" various transactions in a system. To make it easy on myself I assigned shortcut keys Ctrl + r. Boy, did that make life easier! But there was some kind of situation, I do not recall the details, but something was not working right in all conditions. I wondered if somewhere in some file that was open all the time (personal.xls, etc) there was another routine that used the same keystrokes. I even started trying to find a way to list all of these shortcut key strokes; I don't think I ever finished that project...yes, yet another unfinished project! Anyway, it turned out that I had forgotten that Ctrl + r was the built-in shortcut to "copy right". yikes, egg on my face.
2- Many of my VBA routines are short, sweet, to-the-point utilities that might have a short life. So for convenience I sometimes use names like tom1, tom2, bob7, bob77, etc. This goes back to the days of Excel 5 and VBA. Well, a few months ago I was trying to 'link' such a routine to a form control button on a worksheet and kept getting errors! I could give that routine another name and it would link to the button.
What it proved to be is that my sub named "tom12" in a Module could not be linked to the button on a worksheet. Excel thought that "tom12" referred to the cell in column "tom" and row "12". But a similar name in the VBA code for the worksheet could be linked to the command button...even if these were on different sheets! I realized that this conflict would not have happened except that sometime back Excel was opened up to more rows and columns than I'll use in a lifetime. But why only when in the Module, not in the worksheet's VBA code?
3- My most recent "gotcha!!!" was again a name thing, actually the very same cause as above but in a different circumstance. I wanted to call a sub that was in another workbook. I followed the simple procedure as described in Help, as found at some good Excel sites on the web, and as described in my Walkenbach 'Excel 2007 Power Programming with VBA' book. The darn things just would not work for me, I always would get a cryptic error, driving me to check the "Trust Center" (boy, I had forgotten all about that thing), the VBA Tools/References, etc, all sorts of places where I fear to tread. For some reason I just tried changing the name (maybe in preparation for posting a question here at eng-tips) and by golly the doggone thing worked! arrggghhh, sometimes Excel is so-ooo frustrating!
For entertainment, here are a few of the things that have driven me batty with Excel over time. No telling how many hours were expended trying to resolve each of these.
1- Some time back I had a VBA routine to "register" various transactions in a system. To make it easy on myself I assigned shortcut keys Ctrl + r. Boy, did that make life easier! But there was some kind of situation, I do not recall the details, but something was not working right in all conditions. I wondered if somewhere in some file that was open all the time (personal.xls, etc) there was another routine that used the same keystrokes. I even started trying to find a way to list all of these shortcut key strokes; I don't think I ever finished that project...yes, yet another unfinished project! Anyway, it turned out that I had forgotten that Ctrl + r was the built-in shortcut to "copy right". yikes, egg on my face.
2- Many of my VBA routines are short, sweet, to-the-point utilities that might have a short life. So for convenience I sometimes use names like tom1, tom2, bob7, bob77, etc. This goes back to the days of Excel 5 and VBA. Well, a few months ago I was trying to 'link' such a routine to a form control button on a worksheet and kept getting errors! I could give that routine another name and it would link to the button.
What it proved to be is that my sub named "tom12" in a Module could not be linked to the button on a worksheet. Excel thought that "tom12" referred to the cell in column "tom" and row "12". But a similar name in the VBA code for the worksheet could be linked to the command button...even if these were on different sheets! I realized that this conflict would not have happened except that sometime back Excel was opened up to more rows and columns than I'll use in a lifetime. But why only when in the Module, not in the worksheet's VBA code?
3- My most recent "gotcha!!!" was again a name thing, actually the very same cause as above but in a different circumstance. I wanted to call a sub that was in another workbook. I followed the simple procedure as described in Help, as found at some good Excel sites on the web, and as described in my Walkenbach 'Excel 2007 Power Programming with VBA' book. The darn things just would not work for me, I always would get a cryptic error, driving me to check the "Trust Center" (boy, I had forgotten all about that thing), the VBA Tools/References, etc, all sorts of places where I fear to tread. For some reason I just tried changing the name (maybe in preparation for posting a question here at eng-tips) and by golly the doggone thing worked! arrggghhh, sometimes Excel is so-ooo frustrating!