+ Reply to Thread
Results 1 to 4 of 4

Help with VBA Excel - import fifth excel sheet in a workbook to access table

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Help with VBA Excel - import fifth excel sheet in a workbook to access table

    Hi guys,

    I need help with my VBA code. Totally new with the whole programming stuff so bear with me.

    Here is the code that I have right now.


    Please Login or Register  to view this content.

    When I run the code (F5), it generated an error message "Run-time error '424': object required"... What did I do wrong here?

    Thanks!
    Last edited by arlu1201; 08-31-2012 at 02:42 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Help with VBA Excel - import fifth excel sheet in a workbook to access table

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Help with VBA Excel - import fifth excel sheet in a workbook to access table

    I think the issue may be in your spreadsheet type. You have listed TypeExcel8 which is an Excel 97 worksheet, but the spreadsheet name alludes to a 2007/2010 spreadsheet.

    Look here for help on that.

    http://msdn.microsoft.com/en-us/libr...ffice.12).aspx
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    08-31-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Help with VBA Excel - import fifth excel sheet in a workbook to access table

    Hi,

    I've mostly fixed the code. The code works however there's a minor issue that i'm sure it's quite easy to fix.

    when i ran the code, there was this additional 8 extra empty records (rows) in access.

    i only have 9210 rows of data in excel but because of this 8 extra columns, it ends up being 9218 rows in access. here's the code that I have now:

    Please Login or Register  to view this content.
    can anyone help me on this? thanks!

    Quote Originally Posted by alansidman View Post
    I think the issue may be in your spreadsheet type. You have listed TypeExcel8 which is an Excel 97 worksheet, but the spreadsheet name alludes to a 2007/2010 spreadsheet.

    Look here for help on that.

    http://msdn.microsoft.com/en-us/libr...ffice.12).aspx

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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