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

    Using VBA to load a series of files in one go

    I would pick up the employee name from a list somewhere. If you really want a list of folders I suggest you do a search for 'FileSystemObject'. This should give you the 'bones' Sub test() Dim BaseFolder As String Dim MyName As String Dim FileName As String Dim FullFileName As...
  2. BrainB

    Working with controls and backspace key.

    Try using View TabOrder (= "z order") to set the sequene of controls instead of code. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  3. BrainB

    How do I display a Please Wait message ?

    Seems a bit longwinded to me. All I do is show a suitably formatted textbox (from Drawing toolbar) and delete it when done. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  4. BrainB

    Kill a Sub using VBA

    Perhaps something like this. The first run changes the cell and locks it. Subsequently when the workbook is opened an error is produced which skips the lines of code. The other cells in the sheet need to be unlocked so the user can make changes. Private Sub Workbook_Open() Dim MyCell As...
  5. BrainB

    Save As FileFormat Question

    Seems a strange question because all you need to do is to do the Save As when you will find it will do what you want. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  6. BrainB

    Form Open

    Could go the whole hog :- Sub test() Application.Visible = False UserForm1.Show Unload UserForm1 Application.Visible = True End Sub Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  7. BrainB

    VB launches Excel then interesting problem...

    I wonder if you can use something like this to stop the last workbook being closed. Need to add a bit more to make sure you can close it when you want to :- Private Sub Workbook_BeforeClose(Cancel As Boolean) If Workbooks.Count = 1 Then MsgBox ("Cannot close last workbook yet.")...
  8. BrainB

    Multiple threads / simultaneous procedures

    Could try running another instance of Excel (in a similar way to running Word from Excel, or Excel from Word). Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  9. BrainB

    How to check a comment is exist?

    I stand corrected. (Blush) Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  10. BrainB

    print a tool of vb

    Don't really know what you mean. If you want a picture of your form use keys Alt + PrintScreen and Paste in Word. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  11. BrainB

    Excel Userform Commandbutton Limit?

    I have had lots more buttons on forms than that. How many other controls do you have on the form ? Make sure no controls overlap. I would suspect some form of file corruption - which includes anything which might be in the workbook. When developing things poor old Excel cannot cope at times...
  12. BrainB

    typeName question

    If you copy/paste & run the code I posted earlier you will see that this is not the case. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  13. BrainB

    How to check a comment is exist?

    Making it hard for yourself. Just clear any comment and put the new one. No error is produced if the comment does not exist. ' partial code ActiveCell.ClearComments ActiveCell.AddComment ... etc. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know...
  14. BrainB

    typeName question

    Hopefully this code should answer your question :- Sub test() Dim MyVariable As Variant '------------------------ Set MyVariable = ActiveSheet.Range("A1") MsgBox (TypeName(MyVariable)) '--------------------------- MyVariable = "A string" MsgBox (TypeName(MyVariable))...
  15. BrainB

    Simple way to sum contents of an array?

    Try :- x = Application.WorksheetFunction.Sum(abc) Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how. ================================
  16. BrainB

    DYNAMICALLY CREATE FORM

    Yes it is possible. I see you have some starters already. There is loads of code around. Personally I would set up a userform with more textboxes than I need and hide the unwanted ones. Perhaps resizing the form with code too. Dead easy. Not only would this make (coding/layout)life easier but...
  17. BrainB

    GetObject - how select what to get ?

    Hopefully this will help for further research. Your requirement would seem that a simplified version of this would work because your application is running and you will know the window name. '====================================================== Private Declare Function M_GetActiveWindow Lib...
  18. BrainB

    windows username and password

    This gets the user login name. If you could discover the password it would rather defeat the object, wouldn'tit ?? Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _ "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Sub test() X = fOSUserName MsgBox...
  19. BrainB

    Module Size

    If it is a big project it could be easier to change or debug in following months. eg. I Dim the main Public variables in their own module so they act as like an index. Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you know how...
  20. BrainB

    How to ask to select a cell in Excel and then read the position?

    Dim MyAddress As String Dim MyRow As Long Dim MyColumn As Integer '------------------------------ MyAddress = ActiveCell.Address MyRow = ActiveCell.Row MyColumn = ActiveCell.Column Regards BrianB Use CupOfCoffee to speed up all windows applications. It is easy until you...

Part and Inventory Search

Back
Top