+ Reply to Thread
Results 1 to 5 of 5

Need Help With Coding Command Button to Close Sheet Text Box

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Silver Bay, MN
    MS-Off Ver
    Excel 2010
    Posts
    47

    Need Help With Coding Command Button to Close Sheet Text Box

    I have a textbox on Sheet3 called txtbxPathFileName. This textbox is pictured below. It pulls in the path & file name and allows user to open the FileSaveAs dialog to modify the save location and/or file name. This works perfectly. I have been unable to close the form. I have tried various code eg: Unload Me attached to the cmdExit button labeled "Proceed..." but nothing works. Any and all help appreciated.

    P.S. The txtbxPathFileName is called in the Workbook_Open event. Its purpose is to prompt users to save the file in a location of their choice or they can proceed immediately to the workbook.

    txtbxPathFileName.jpg

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Need Help With Coding Command Button to Close Sheet Text Box

    Try Visible = false

  3. #3
    Registered User
    Join Date
    12-02-2012
    Location
    Silver Bay, MN
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Need Help With Coding Command Button to Close Sheet Text Box

    Thanks mehmetcik, I tried Visible = False and txtbxPathFileName disappears. However the embedded text box, labels and buttons on sheet remain visible. They are grouped with txtbxPathFileName. I can try to hide each control but that seem inelegant. Any thoughts?

    txtbxPathFileName2.jpg

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Need Help With Coding Command Button to Close Sheet Text Box

    do you have any other active x components on the sheet?

    if not then create to hide all activex components

  5. #5
    Registered User
    Join Date
    12-02-2012
    Location
    Silver Bay, MN
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Need Help With Coding Command Button to Close Sheet Text Box

    I have a series of active x command & toggle buttons on sheet. (See image) I was able to hide and show txtbxPathFileName and imbedded elements by listing them all in hide and show code respectively in a module and then calling the code as appropriate. Not elegant but it works.

    txtbxPathFileName3.jpg
    Last edited by mandora; 10-08-2014 at 04:45 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Command Button Coding Error
    By ali_lum in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-11-2014, 06:48 AM
  2. command button coding to delete column values
    By mubashar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2014, 02:38 PM
  3. Coding Search and Update Command Button in an UserForm
    By sottojeromey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2013, 06:39 AM
  4. Disable close workbook but still force users to close thru command button
    By rathig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 07:29 AM
  5. coding a command button to open a particular worksheet
    By mashoutposse in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2010, 06:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1