Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

How can I get a macro to run another macro upon completion?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CJ - 29 Nov 2005 15:38 GMT
I have a macro that creates a signature block, and asks the user to enter a
three digit user name, and then instructs user to run a second macro to
convert the initials to full name and I.D.#.

How can I get the macros to run successively?  Help much appreciated!
Stephen English - 30 Nov 2005 00:11 GMT
You don't necessarily need a second macro
Try this

Dim strUser as String

strUser = InputBox("Please enter your three digit user name","Name?")
Select Case struser
Case "SDE"
Name = "Stephen English"
ID = 1234
Case "CJ"
Name = "Chris Johnson"
ID=1235
end select

and you just keep going with what you want to do with it.

If you need to display a user form, then when the user clicks the OK on the
UserForm, set the .tag property of the form to the initials and use it in
your macro

HTH
Stephen English

> I have a macro that creates a signature block, and asks the user to enter a
> three digit user name, and then instructs user to run a second macro to
> convert the initials to full name and I.D.#.
>
> How can I get the macros to run successively?  Help much appreciated!
CJ - 30 Nov 2005 14:21 GMT
Hi, Steve.  This macro will be used by approximately 60 people.  While this
would work if only one person were using it, but what to do in the case of 60
different names and 60 different I.D. numbers?  I had set up the second macro
to search and replace on the entire document on the three initials (.xxx).  
Would it be possible to do the input box and then have it search and replace
on that? Then couldn't  I then simply copy the second macro code up into the
first macro?

I'm a very green beginner with VBA, so please forgive me if I sound exactly
like I am -- a newbie.  Thanks

> You don't necessarily need a second macro
> Try this
[quoted text clipped - 25 lines]
> >
> > How can I get the macros to run successively?  Help much appreciated!
CJ - 30 Nov 2005 21:11 GMT
Oops.  I see the rest of what you wrote. Sorry, and thank you so much.

> Hi, Steve.  This macro will be used by approximately 60 people.  While this
> would work if only one person were using it, but what to do in the case of 60
[quoted text clipped - 36 lines]
> > >
> > > How can I get the macros to run successively?  Help much appreciated!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.