Macro in a macro

  • Thread starter Thread starter tod
  • Start date Start date
T

tod

From the desk of the lazy programmer:

I find myself always typing some of the same info over and over in
different procedures. It's not a scenario where a class module or
other such thing would be needed. Just pesky stuff like typing in the
ConnectionString for an ADO Connection object. It's always the same
ConnectionString. I've tried various ideas like keeping the string in
a text file or as a comment in the Personal.xls file, but I wonder if
there is a way to have the editor generate the string for me with a
short key combination or some other thing. It's not a problem, just a
wish.

tod
 
Tod;

You have no other options then to record a macro and save it in a module in
the personal.xls file.
Also you vcan save it in a textfile, paste that routine in a module and call
it from your procedures.

I can't think of any more options.

Mark.
 
Hi Tod

Download and install the brilliant add-in MZtools from
http://www.mztools.com/
it keeps/pastes your templates and snippets, set your defaults, review your
code and tons of other goodies.

HTH. Best wishes Harald
 
What about creating a DSN? If you called it 'MyDSN' then your
connection string would become:

oConn.ConnectionString = "DSN=MyDSN"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top