Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Importing Custom (ud) functons from Excel to Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
H_D - 14 Nov 2006 14:07 GMT
I've written a number of user-defined / custom functions and saved them as
modules in Excel. Is there an easy way to import them for use in Access.
These functions refer to parameters, names and tables in the particular excel
workbook (though they could all presumably be saved as an add-in).

What is the best way to make use of these functions in Access?

H_D
Klatuu - 14 Nov 2006 15:29 GMT
The easiest is just to copy them in to a standard Access module.

> I've written a number of user-defined / custom functions and saved them as
> modules in Excel. Is there an easy way to import them for use in Access.
[quoted text clipped - 4 lines]
>
> H_D
H_D - 16 Nov 2006 07:23 GMT
Thanks.

Do you mean that I should copy the code, or is there some way to move the
entire module, including the functions etc into the access VBA editor? (Or
perhaps somehow save the module in excel then open in Access?)

With regards to the functions referencing figures in Excel, will these
figures need to be copied into an Access table, or left in the excel
spreadsheet?

H
Klatuu - 16 Nov 2006 14:51 GMT
You can do an export/import that will move modules from Excel to Access.
In the VBA editor in Excel, open the module you want to move to Access.
File, Export
You will get a common file dialog that allows you to choose the destination
location and file name.  It will have an extension of .bas - Leave the
extension as it is.
Then Save.  It will put a file in the selected folder with the modulename.bas

Now, to get it into Acces.  In the VBA editor
File, Import. - Navigate to the .bas file and click open.  It will import
the module as a module in you mdb.

> Thanks.
>
[quoted text clipped - 7 lines]
>
> H
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.