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 IamaSherpa 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: *

  • Users: gh61
  • Order by date
  1. gh61

    How do I get an Excel function to run with a Macro

    Recording a macro gives this: Application.Run "ATPVBAEN.XLA!Pttestm", , , ActiveSheet.Range("$M$14"), _ False, 0.05 It recorded my output range but not my input ranges. You may need to search MSDN to find out the correct arguments. HTH Graeme
  2. gh61

    WorksheetFunction.Sum & AutoFilter - sums all values not the filtered

    I posted mine before I saw Skip's, and it is of course a much better solution. I've never really looked at subtotal before, but I will now! Where do I hand my star back? :(
  3. gh61

    WorksheetFunction.Sum & AutoFilter - sums all values not the filtered

    Try: Set myRange = Range("H:H").SpecialCells(xlCellTypeVisible) dblTotal = Application.WorksheetFunction.Sum(myRange) HTH gh
  4. gh61

    Book on VBA/Excel/Macros

    It assumes some familiarity with excel, but other than that you should have no problems. Have you tried recording some simple macros yourself and examining the code that's generated?
  5. gh61

    Book on VBA/Excel/Macros

    Covers everything you could possibly want to know, I think, and mucmore besides! Also have a look at his website: http://www.j-walk.com/ss/ Also bear in mind there are a great many resources on the web where you can learn for free..... Graeme
  6. gh61

    Book on VBA/Excel/Macros

    John Walkenbach's Power Programming With VBA is about the best I've seen. The Microsoft Press Step-By-Step Excel Development book isn't too bad. Graeme
  7. gh61

    Custom error message

    I'm not aware of any way of doing this in Excel. A workround might be to use the Worksheet_Change event to trap any attempt to change cells you want to protect, then warn the user accordingly. HTH Graeme
  8. gh61

    Criteria for TextBox

    You're very welcome - glad I got there eventually!! And thanks for the star.
  9. gh61

    Criteria for TextBox

    Christer, Apologies, I misunderstood how you want the masked edit to behave if nothing is entered. Does this do what you want? Private Sub Ed1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Ed1.Text = "______-____" Then 'nothing was entered, carry on ElseIf Not Ed1.Text Like...
  10. gh61

    Criteria for TextBox

    If you're doing your validation in the Exit event code as in your first post, why not use an ordinary text box? What is the masked edit doing for you?
  11. gh61

    Criteria for TextBox

    Not sure if I understand - do you want the masked edit box to display nothing at all (ie no mask clues) if there isn't an otherwise valid string? For example, from the help: "To clear the Text property when you have a mask defined, you first need to set the Mask property to an empty string, and...
  12. gh61

    Delete Excess rows - type mismatch error

    Perhaps try deleting rows rather than columns? .Rows(strRange).Delete G
  13. gh61

    Criteria for TextBox

    Will this work, or am I missing something? Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox1.Text <> "" Then If Not TextBox1.Text Like "######-####" Then MsgBox ("Wrongly stated!") Cancel = True End If End If End Sub
  14. gh61

    Printing calendars with VBA in Outlook 2000

    This may help you get going, or searching the site might give more detailed information: http://www.outlookcode.com/codedetail.aspx?id=290 HTH
  15. gh61

    Selecting Items in a list box

    What do you get if you use the .Text property instead of .ListIndex?
  16. gh61

    Selecting Items in a list box

    As far as I can tell, both methods of selecting item 1 work fine. What code are you then using to return the selected item, and what is the exact error message?
  17. gh61

    Selecting Items in a list box

    How are you getting the selected item from the listbox? Are you using list_test.Text? Both your methods seem to work for me (Office 2002) HTH
  18. gh61

    Can't fix &quot;Method Range of Object&quot;_Global Failure.

    Try removing the Range keyword from your Set lines: Set rngDAFRPCA = Worksheets("Prepared_Expense").Range("Q6").Offset(1, -15) Set rngGMPCA = Worksheets("First QT").Range("B4") Set rngToCopy = Worksheets("First QT").Range("CB5:CE5") Set rngDestin =...
  19. gh61

    What references do I need to automate outlook?

    This works for me (setting ref to Outlook 10.0): Dim objApp Dim mi As Outlook.MailItem Set objApp = CreateObject("Outlook.Application") Set mi = objApp.CreateItem(olMailItem) I don't see the CreateItem in your code?
  20. gh61

    What references do I need to automate outlook?

    Try something like: Dim objOutlook As Outlook.Application Dim olMail As Outlook.MailItem Set objOutlook = New Outlook.Application Set olMail = objOutlook.CreateItem(olMailItem) HTH

Part and Inventory Search

Back
Top