+ Reply to Thread
Results 1 to 6 of 6

Save data From Excel Into Access

  1. #1
    Registered User
    Join Date
    10-02-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    21

    Save data From Excel Into Access

    Hello Everyone.......

    i am trying to write a macro, where in when i click a button (MACRO) the data that i have typed in excel should get saved in Access. i tried this macro..... the macro runs without any error, but there is nothing which gets executed..... can anyone help




    ======MACRO=====

    Please Login or Register  to view this content.


    I have saved the access Workbook as "Main.dbf"
    and the table which the data has to be saved is "Company"
    there are 5 columns to be saved....

    the excel book where data is typed is "Experiment", and the worksheet is "Sheet1"


    there is no error in the macro.... but there is no execution either....

    PLEASE HELP

    Sibalamit
    Last edited by sibalamit; 03-01-2010 at 01:13 PM.

  2. #2
    Registered User
    Join Date
    10-02-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    21

    Save data From Excel Into Access (With Code Attached)

    Save data From Excel Into Access

    --------------------------------------------------------------------------------

    Hello Everyone.......

    i am trying to write a macro, where in when i click a button (MACRO) the data that i have typed in excel should get saved in Access. i tried this macro..... the macro runs without any error, but there is nothing which gets executed..... can anyone help




    ======MACRO=====

    Please Login or Register  to view this content.


    I have saved the access Workbook as "Main.dbf"
    and the table which the data has to be saved is "Company"
    there are 5 columns to be saved....

    the excel book where data is typed is "Experiment", and the worksheet is "Sheet1"


    there is no error in the macro.... but there is no execution either....

    PLEASE HELP

    Sibalamit

  3. #3
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Save data From Excel Into Access

    I ran your code with a dummy workbook and database and it worked correctly. I have a couple of questions:
    1 Why is your database .dbf? Access is usually .mdb.
    2 Are you running the macro with the correct worksheet active?
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  4. #4
    Registered User
    Join Date
    10-02-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Save data From Excel Into Access

    Hi dave,

    i had typed the name wrong.....
    it is saved as data.mdb.......

    but that code is still not working......
    do i have to give some permissions from excel.......
    or do i have to change any options....

    please help me

    Sibalamit

  5. #5
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Save data From Excel Into Access

    Is your excel book protected at all? If you could post the workbook (minus any sensitive info) that might help.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Save data From Excel Into Access

    Your code is opening main.mdb, not data.mdb...
    Are you getting any errors, or are you getting blank rows added to your table, or something else?
    Remember what the dormouse said
    Feed your head

+ 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