Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. BarryG

    Calling a macro from a menu item

    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
  2. BarryG

    Add items to a multi-column Listbox?

    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"
  3. BarryG

    Common Dialog

    comdlg32.ocx should come standard with the Office suite. Have you added it to your toolbox?
  4. BarryG

    Calling a macro from a menu item

    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...
  5. BarryG

    Collection index -XL2000

    Ide, I tried the shapes collection, but I think it only applies to objects on worksheets, not on UserForms. Thanks anyway.
  6. BarryG

    Collection index -XL2000

    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...
  7. BarryG

    Excel help please

    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.
  8. BarryG

    Different methods in different versions

    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...
  9. BarryG

    How to keep focus on a text box after the 'after update' event

    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.
  10. BarryG

    Different methods in different versions

    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...
  11. BarryG

    Excel97 problem with sort

    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...
  12. BarryG

    Excel97 problem with sort

    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?
  13. BarryG

    MS WORD

    If your doc ument has drawing, you can go to Tools&gt; Options&gt; View tab and de-select Show Drawings. This will turn off the display of drawings, but not save the setting in the document.
  14. BarryG

    Excel97 VBA: How can I count open workbooks that are not hidden?

    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
  15. BarryG

    Excel97 VBA: How can I count open workbooks that are not hidden?

    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
  16. BarryG

    Query using controls on form as criterias

    If the field is truly blank (not defaulting to a zero or something), the query should treat it as though there is no criterion for that field.<br> <br> You might also try LIKE. Try this for the criteria:<br> <br> LIKE &quot;*&quot; and forms![formname]![textbox] and &quot;*&quot; <br> <br> This...
  17. BarryG

    Unable to Spellcheck a protected form

    Unfortunately, the solution is not pretty. This is from a post here last week:<br> <br> SUMMARY<br> This article describes methods that allow you to: <br> <br> Retain information you type into a form field when you protect a form.<br> <br> <br> Unprotect a forms document, perform a spell check...
  18. BarryG

    Macros?

    Try using Pivot tables. You can create unique pivot tables on individual sheets that each specify different criteria and will be automatically updated as the main sheet's data changes.
  19. BarryG

    Catching the "cancel" button request on the input box of a query

    Use error handling. Trap the specific error with a specific message.
  20. BarryG

    Catching the "cancel" button request on the input box of a query

    Use error handling. Trap the specific error with a specific message.

Part and Inventory Search

Back
Top