ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Are macros interchangable between Excel and Access??? (https://www.excelbanter.com/excel-programming/339468-macros-interchangable-between-excel-access.html)

Ray via OfficeKB.com

Are macros interchangable between Excel and Access???
 
Once I write a Macro are they interchangeable between Access and Excel with
minimal Programing effort?

Thanks again In advance!

K Dales[_2_]

Are macros interchangable between Excel and Access???
 
In general, no (though it depends on what you are trying to do). To be
functional within an application the macros need to reference the objects
that are specific to that application. For example, in Access you may want
to set a control on a form to equal the current time/date:
Forms("MyForm").TextBox1.Value = Now()
Whereas in Excel you may need to reference a range on your worksheet:
Worksheets("SheetName").Range("B5").Value = Now()
So some of the code might be the same but you would have to do major editing
to reference your Excel objects instead of Access objects.
--
- K Dales


"Ray via OfficeKB.com" wrote:

Once I write a Macro are they interchangeable between Access and Excel with
minimal Programing effort?

Thanks again In advance!



All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com