Getting the root of the macro
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Getting the root of the macro

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
juno
Guest





Posted: Mon Mar 28, 2005 8:54 pm    Post subject: Getting the root of the macro Reply with quote

I have a macro that would be distributed to several locations. What I would like the macro to be able to do is to be able to locate it’s location.

So if I move the macro to a different location it should give me it’s new location.

Any ideas???

Back to top
Matt W
Guest





Posted: Mon Mar 28, 2005 9:13 pm    Post subject: Re: Getting the root of the macro Reply with quote

This will give you the full file name (drive, path & file name).

MsgBox ThisDrawing.Application.VBE.ActiveVBProject.FileName

--
I support two teams: The Red Sox and whoever beats the Yankees.

"juno" <nospam@address.withheld> wrote in message
news:18748134.1112025283609.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
I have a macro that would be distributed to several locations. What I would
like the macro to be able to do is to be able to locate it's location.

So if I move the macro to a different location it should give me it's new
location.

Any ideas???
Back to top
juno
Guest





Posted: Mon Mar 28, 2005 10:50 pm    Post subject: Re: Getting the root of the macro Reply with quote

Thank you Matt. That's exactly what i need.

-Juno

Back to top
Matt W
Guest





Posted: Mon Mar 28, 2005 10:54 pm    Post subject: Re: Getting the root of the macro Reply with quote

Glad I could help.

--
I support two teams: The Red Sox and whoever beats the Yankees.

"juno" <nospam@address.withheld> wrote in message
news:27521462.1112032287909.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
Thank you Matt. That's exactly what i need.

-Juno
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB