Thanks Joao.
The only way to accomplish this was to use the Application.Caller method to determine which menu item was being clicked. This method returns and integer that indicates the menu index.
Thanks for your suggestion.
Barry
You can use the List property to assign values to each column. Assuming a two-column list box, this code assigns values to the two columns of the first row of ListBox1:
ListBox1.List(0, 1) = "Row 1, Col 1"
ListBox1.List(0, 2) = "Row 1, Col 2"
I have a controlbutton object attached to a menu. The OnAction property works well if I do a straight call to a Sub procedure. However, I have a different Sub procedure that takes arguments. When I try to place 'Call ' in front of the Sub name in the OnAction property, the macro is not found. Is...
I'm trying to refer to a member of a collection by using a statement for the index. Specifically, I want to move through the controls on a form by using their TabIndex properties, rather than the collection index.
I've tried:
For i = 1 to Controls.count
Controls(TabIndex = i).Select
'do...
I believe that most POP mail applications save attachments to a temp directory on your c drive when you read them. You might be able to access this saved file location.
DC,
Thanks for your reply. This is what I tried, but the then portion of this statement needs to include the .NoProofing method, which is valid in Word2000 but not in Word97.
What I decided to do is to break this statement out into a function that I call from my main procedure. This way the...
I've done this many times, although it's probably not the most elegant solution. Put your criteria checking in the OnEnter event of the next control in the tab order. If it fails, send the focus to your previous text box.
I'm writing a macro in Word that needs to be able to run in Word 97 and Word 2000. However, when it's run in 2000, I need to add a statement that 97 doesn't require. The problem is that the method I need in 2000 doesn't exist in 97 so when I run it in 97 it gives me a compile error "Method...
I use Excel to manipulate downloads from our main system, SAP. Some values have leading zeroes. If I accept the default format, General, leading zeroes are stripped off. Text retains the zeroes.<br><br>An example of the...
I sometimes experience problems trying to sort columns that contain numbers formatted as text. The sort either doesn't work at all or sorts in several blocks. I've made sure that there are no leading or trailing spaces or special characters. Any ideas?
If your doc ument has drawing, you can go to Tools> Options> View tab and de-select Show Drawings. This will turn off the display of drawings, but not save the setting in the document.
Thanks, Monica. It worked well. I was stuck because visible wasn't a valid property of the workbooks collection and I didn't know about the Windows collection. I'm very new to VBA in Excel so it's taking a while to learn to collection, properties, methods, etc.<br>
<br>
Thanks again,<br>
Barry
In a function I'm writing, I need to find the number of open workbooks, but I want to exclude those that are hidden. Please help!<br>
<br>
Thanks<br>
Barry
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.