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 / September 2007

Tip: Looking for answers? Try searching our database.

Anyone know how to assign a Macro to a Commandbutton?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carlos - 26 Sep 2007 21:29 GMT
I'm having trouble tying in a macro to a command button I place at the end of
a Word form. The Macro exports the filled-in info to a spreadsheet, but I
don't see anything in the button's properties that would execute the
macro...???
Karl E. Peterson - 27 Sep 2007 23:30 GMT
> I'm having trouble tying in a macro to a command button I place at the end of
> a Word form. The Macro exports the filled-in info to a spreadsheet, but I
> don't see anything in the button's properties that would execute the
> macro...???

Open the Visual Basic Editor, double-click "ThisDocument" in the Project Explorer
window, then select "CommandButton1" (or whatever you called it) in the "(General)"
dropdown at the upper-left in that code window.  This is the routine that will
execute when that button is punched.
Signature

.NET: It's About Trust!
http://vfred.mvps.org

 
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.