![]() |
#10
|
||||
|
||||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hiding Command Buttons before PDF | ksigcajun | Word VBA | 3 | 05-07-2014 05:31 AM |
![]() |
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 |