+ Reply to Thread
Results 1 to 7 of 7

Error 91 VBA

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    Quantico, VA
    MS-Off Ver
    Excel 2013
    Posts
    74

    Question Error 91 VBA

    Can someone please tell me what I'm doing wrong..
    Please Login or Register  to view this content.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Error 91 VBA

    When you click debug, it's highlighting which line of code?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    11-19-2012
    Location
    Quantico, VA
    MS-Off Ver
    Excel 2013
    Posts
    74

    Re: Error 91 VBA

    I've attached a copy of the file. its the show form command.
    Attached Files Attached Files

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Error 91 VBA

    Delete the below line of code from Private Sub buttonDownload_Click()

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-19-2012
    Location
    Quantico, VA
    MS-Off Ver
    Excel 2013
    Posts
    74

    Re: Error 91 VBA

    Thanks!, how did you realize that was the problem? also how do I get the form to go away? In fact i would prefer the form never shows up.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Error 91 VBA

    Thanks!, how did you realize that was the problem?
    I just stepped in your code to track where it is failed. Because you are trying to open the form but having a code to unload the form via Userform Load evert. So again when the code completes the initialisation (Also Closing of Userform Also) and coming back to open the form then again the loading event triggers the same activity...

    In fact i would prefer the form never shows up
    Instead of

    Please Login or Register  to view this content.
    Use

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-19-2012
    Location
    Quantico, VA
    MS-Off Ver
    Excel 2013
    Posts
    74

    Re: Error 91 VBA

    Thank you so much. You saved me so much time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  2. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  5. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1