Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 01-04-2015, 05:14 AM
gmayor's Avatar
gmayor gmayor is offline Hide Command Buttons Windows 7 64bit Hide Command Buttons Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

OK, a link is one way to do it. You will find the additional functions I threw in useful in a variety of VBA projects.

As a generalisation, I would avoid using text boxes to format documents (you will note I removed one and replaced it with a bookmark for the insertion of text directly into the document). Text boxes just complicate things unnecessarily. This method of hiding buttons is a notable exception.

If you want boxes, use table cells or frames, as they are easier to process, being in the text 'layer' of the document.

Check VBA Editor > Tools > Options > Editor > Require Variable Declaration as this will help point out errors in your coding. It's a good idea to start on your VBA path by declaring all variables, and this will insist on it.

You can find the shapes index with a macro e.g.
Code:
Sub GetShapeIndex()
Dim i As Long
    For i = 1 To ActiveDocument.Shapes.Count
        ActiveDocument.Shapes(i).Select
        Application.ScreenRefresh
        MsgBox "Shapes(" & i & ") selected"
    Next i
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding Command Buttons before PDF ksigcajun Word VBA 3 05-07-2014 05:31 AM
Hide Command Buttons Command buttons on slidemaster chcope PowerPoint 2 06-13-2013 04:30 PM
Command Buttons lorenambrose Word 0 10-06-2011 11:55 AM
command buttons ronf Excel 0 04-28-2006 08:32 AM
command buttons ronf Excel 0 12-03-2005 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft