Results 1 to 7 of 7

Thread: [RESOLVED] Run Excel Module code from Access...

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Location
    Surrey, UK
    Posts
    163

    [RESOLVED] Run Excel Module code from Access...

    I am opening an excel spreadsheet from Access called test.xls like below. I have a Sub saved in the spreadsheet in Module1 called Test.

    How do I run that from Access???



    VB Code:
    1. Dim xlApp As Excel.Application
    2. Dim xlBook As Excel.Workbook
    3. Dim xlWSheet As Excel.Worksheet
    4.  
    5. Set xlApp = New Excel.Application
    6. xlApp.Workbooks.Open ("C:\Test.xls")
    7. xlApp.Visible = True
    8. Set xlBook = xlApp.Workbooks(1)
    9. Set xlWSheet = xlApp.Worksheets(1)
    10.  
    11. 'call xlapp.module1.test   ????????
    12.  
    13.  
    14. xlBook.Module1.test
    Last edited by strobinson1; Oct 25th, 2005 at 03:28 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width