ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I use the same macro for different sets of data? (https://www.excelbanter.com/excel-discussion-misc-queries/98879-how-can-i-use-same-macro-different-sets-data.html)

Dean

How can I use the same macro for different sets of data?
 
Hi,

I am trying to use a macro at the moment to order data i retrieve off of a
database.

I can run the macro for the data i used to record the macro, but not when i
try to use a new piece of data. It just reverts back to the data i originally
recorded.

I would be very grateful if anybody could help?

mrice

How can I use the same macro for different sets of data?
 

You will need to edit the macro that you recorded to make it generic.
Look at the code using ALT-F11 to start with.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=560796



All times are GMT +1. The time now is 12:24 PM.

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