Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2013, 02:34 AM
Bengt Bengt is offline ActiveX Command Button disappears after click Windows 7 32bit ActiveX Command Button disappears after click Office 2003
Novice
ActiveX Command Button disappears after click
 
Join Date: Feb 2013
Posts: 8
Bengt is on a distinguished road
Default ActiveX Command Button disappears after click

I am using Word 2013.



I am quite used to VBA in Excel, and now, in my Word-document, I wanted to display a userform, containing a textbox, and then let the user type text in the textbox and then enter this text into the Word-document.

I found the ActiveX command button control under the developer tab, so I inserted a command button in my document. The only code attached to the command button was a call to a VBA-macro to display my form (Userform1.show).

It worked at first. I clicked the button, the form was displayed. I added some text to the textbox and clicked my commandbutton on my form. The text was inserted into the document. However, the ActiveX command button disappeared too. What did I do wrong?

Grateful for any hints.

Bengt
Reply With Quote
  #2  
Old 09-18-2013, 12:42 PM
snooklepig snooklepig is offline ActiveX Command Button disappears after click Windows 7 32bit ActiveX Command Button disappears after click Office 2010 32bit
Novice
 
Join Date: Sep 2013
Posts: 1
snooklepig is on a distinguished road
Default

Bengt,

I realize this post is a few months old so you probably have moved on from this question or have already found the answer. I just figured I would post back since I ran across this same issue yesterday in Word 2010.

I have a document with three buttons. The three buttons call userforms that have textboxes on them. The click events for the OK buttons of the userforms update bookmarks in the document. When setting the text of the bookmarks, the bookmarks are automatically deleted.

The Layout properties of the three buttons in the document are set to be "In Front of text" which makes them part of the Shapes collection in the document. Each Shape is anchored to a paragraph in the document. If you toggle the Show/Hide button in the Paragraph section of the Home ribbon, you will be able to see an anchor next to the paragraph to which the Shape is anchored.

In my case, my buttons were anchored to a paragraph that was a bookmark to be updated. When the bookmark got updated, it deleted the bookmark, as well as the button that was anchored to the paragraph. Sorry this is a little long, but I hope it helps you or someone else that might be having the same issue.

Best regards,
Snooklepig
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click on a message and it disappears, refresh and it is back MichaelParsons Outlook 0 02-01-2013 05:31 PM
activex command buttons and text boxes TRG Word 0 02-03-2012 09:18 AM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
ActiveX Command Button disappears after click Command Button cksm4 Word VBA 7 02-27-2011 08:47 PM
Add-In:How to add command right click command bar phang Outlook 0 01-15-2007 02:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:08 PM.


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