Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 27 of 27

Thread: Using VBA Set for workbook and worksheet

  1. #21
    Quote Originally Posted by June7 View Post
    Yes, the button is there and works.

    This line:

    Set tbl1 = ws.ListObjects.Name = "TableX"

    should be

    Set tbl1 = ws.ListObjects("TableX")


    Also, TableX is pulling only 4 columns. Sub txtbox1_AfterUpdate() expects 6. Resize TableX to include columns E and F.


    Why do you have combobox on worksheet instead of just using the form as interface?
    I was trying to try to filter to find a record in a timely fashion instead of scrolling through 300+ records to find the one I was looking for. I also thought this would be the fastest way to copy the Username & PW to paste on the websites logon page.

    Thank you so much for your patience and expertise. Your solution worked and everything is working as I hoped. Happy Holidays to you and your family.

  2. #22
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    I made a number of edits to previous post, probably while you were reading. Might review again.

    Glad it helped.

    Enjoy your holidays.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #23

    Sorry to bother you again but I ran into problem with your range fix

    When I try to delete the TableX name in name manager the delete option is greyed out. Do you know how I can fix that?

    I have tried numerous programs and vba code to delete the TableX named range without success. Each and every one of the solutions tried doesn't recognize the name range and/or doesn't show it in the list of available names.
    On of the vba codes I tried is:

    Dim wb As Workbook
    Dim nr As Name
    Set wb = ActiveWorkbook
    Set nr = wb.Names.Item("TableX")
    ' give an absolute reference:
    nr.RefersTo = "=MasterData!$A$3:$G$400"  error reads Run-time error'1004' Application defined or object-defined error
    End With
    I am not sure where to go now. Maybe you have an idea?
    Attached Images Attached Images
    Last edited by Aussiebear; 11-20-2022 at 02:05 PM. Reason: Added code tags to supplied code (..Again)

  4. #24
    Quote Originally Posted by StudentJacks View Post
    When I try to delete the TableX name in name manager the delete option is greyed out. Do you know how I can fix that?
    I have tried numerous internet VBA codes and programs to remove the TableX named range but none of them work. In fact, the only range names the programs show are the DropDownList and the Table2 names. None even show the TableX name as being there. Hmmmm.

  5. #25
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    Why delete the TableX, just resize its range. https://support.microsoft.com/en-us/...%20press%20OK.

    Otherwise convert then delete https://support.microsoft.com/en-us/...a-786265d41c77
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #26
    Quote Originally Posted by June7 View Post
    Why delete the TableX, just resize its range. https://support.microsoft.com/en-us/...%20press%20OK.

    Otherwise convert then delete https://support.microsoft.com/en-us/...a-786265d41c77

  7. #27
    Thank you so much. I did not know that the option to convert (resize table) as available.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •