Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 2nd, 2004, 03:43 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copy excel macros to vb project

Is it possible to copy an excel sheet consisting of all macros to a vb project or access database?

Reply With Quote
  #2 (permalink)  
Old November 9th, 2004, 10:11 AM
Registered User
 
Join Date: Nov 2004
Location: Ashland, MA, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you have recorded macros in Excel you can view them using the Visual Basic Editor in Excel and copy the vb code behind the macros and paste this into Excel. You can run these macros directly from Access by defining an excel object first.

Ex. - Dim gappExcel As Excel.Application
Set gappExcel = CreateObject("Excel.application")

Just place the variable in front of each new line of code from excel and it will run it from Access. Hope this helps.
Reply With Quote
  #3 (permalink)  
Old November 9th, 2004, 10:13 AM
Registered User
 
Join Date: Nov 2004
Location: Ashland, MA, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

self correction - meant to say copy the code from Excel to Access.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel macros mustafayildirim@msn.com Excel VBA 1 August 29th, 2007 10:50 PM
How to Run Excel Macros from ASP asptest Classic ASP Databases 7 September 13th, 2006 10:47 AM
Excel Macros with VBA kotaiah Excel VBA 1 September 11th, 2006 01:39 AM
Excel Macros with VBA ASAP kotaiah Excel VBA 0 September 9th, 2006 04:55 AM
How to get a list of macros in an Excel sheet tiyyob Excel VBA 0 January 21st, 2006 06:59 PM



All times are GMT -4. The time now is 01:52 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.