LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
tjh tjh is offline
external usenet poster
 
Posts: 96
Default Access - Excel

Hello,

I would like to run an Excel vba Add-In macro (procedure) from Access vba
code.

- Currently, from Excel, I begin the Excel VBA code which opens a Access Form.
- The form opens other forms depending on the users input.
- When the user makes a selection on one of the final forms, I want the
Excel VBA code to continue running.
- I have set it up as a new procedure in the Excel VBA Add-In, but I am not
sure how to tell Excel to continue with this procedure from Access. At least
not successfully.

I found some code from Dev Ashish on his MVP site, but am having difficulty
making it work. Any thoughts???????

Thank You,

The fosusername() code below references the individuals userID.

The code is below:


'************* Code Start ****************
'This code was originally written by Dev Ashish
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
Sub sRunCARMa()

Dim objXL As Object, x
On Error Resume Next
Set objXL = CreateObject("Excel.Application")
With objXL.Application
.Visible = True
'Open the Workbook

.Workbook.Open "C:\Documents and Settings\" & fOSUserName() &
"\Application Data\Microsoft\AddIns\Various Reports.XLA"
'Include CARMA in menu, run AutoOpen
'.ActiveWorkbook.RunAutoMacros xlAutoOpen
Application.Run ("XLstarts151")
End With
Set objXL = Nothing
End Sub
'************* Code End ****************

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query from Access into Excel cause Access to go to read only T Stephens Excel Discussion (Misc queries) 0 March 24th 09 04:17 PM
Can Excel access data from Access?! Al Excel Discussion (Misc queries) 5 April 5th 08 03:52 PM
export access to excel. change access & update excel at same time fastcar Excel Discussion (Misc queries) 0 June 24th 05 09:27 PM
Access data -work in Excel- save in Access s_u_resh Excel Programming 1 October 25th 04 12:52 PM
Getting Access Error Messages when running Access through Excel Dkline[_2_] Excel Programming 0 October 12th 04 09:35 PM


All times are GMT +1. The time now is 06:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"