+ Reply to Thread
Results 1 to 10 of 10

Userform won't display unless a manual edit made first

  1. #1
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Userform won't display unless a manual edit made first

    Hi, thanks for taking the time to look.

    I have created a userform with text boxes linked to cells, and is displayed by clicking a command button.

    All was working fine until I made my last change which was to format about 24 of the text boxes to show with 2 decimal places. Now when I click the command button the userform will not display and there is no error message. If I delete the code I added it still wont work.

    However if I go to the vba editor and show the userform in design mode and make a change to a cell on the worksheet, the value updates in the userform textbox and I can close the vba editor and the command button will work, and display the userform. Does anyone know why this might happen?

    I am new to VBA and Userforms so I am at a complete loss and couldn't find any solutions online. I am not sure if I have placed all the coding in the right place (if you double click a text box it brings up the userform page and i have placed ALL my coding there for the userform) and am not sure if possibly there is too much coding and its getting confused, as mentioned I am new to this and the page is a bit of a dumping ground for old code that didn't work as I wanted that I thought may come in useful later so added ' before the code to stop them running, and as I have taken bits of code from here and there as I fumbled my way through it it is a bit of a mess, would that play a part?

    Any advice you can offer would be greatly appreciated, this was the last thing i had to do on the userform and I thought It was done, now I'm just pulling my hair out.

    Stuart

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,675

    Re: Userform won't display unless a manual edit made first

    The problem is so specific to your file that it's going to be very difficult to diagnose without it. Can you attach the file? See yellow banner at the top of the page.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform won't display unless a manual edit made first

    Stuart

    What code are you using to display the userform?

    How have you connected the textboxes to the userform?
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: Userform won't display unless a manual edit made first

    Yes of course, apologies it is a mess.

    Button I am using is 'calculate specs' at the top right of the page.

    The manually entering the data in the worksheet is no longer forcing the userform to show, it doesn't show at all now, no changes have been made.
    Last edited by Funkymonkey0073; 12-09-2020 at 09:01 PM.

  5. #5
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: Userform won't display unless a manual edit made first

    Hi Norie

    The code is:

    Sub Open_Userform()
    UserForm1.Show
    End Sub

    Yes I believe all text boxes are connected to the form.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,675

    Re: Userform won't display unless a manual edit made first

    The userform came up the first time I tried by clicking the button.

    In the properties for the userform, the Top value is 300 and the Left value is 2040. That is probably off your screen to the right. I am seeing it because I am using two monitors. Change those values to 0 in the properties, and it will come up in the upper left corner of your screen. (I have no idea why the workaround you described would work.)

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform won't display unless a manual edit made first

    Didn't notice how Left was set but I added this code to center the userform when it opens.
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: Userform won't display unless a manual edit made first

    Thank you, that worked.

    I am using 2 monitors and had set that position, and it was working fine, appearing on the right of the worksheet. No idea why it moved off screen.

    Thanks again, very much appreciated.

  9. #9
    Forum Contributor
    Join Date
    03-19-2019
    Location
    Essex, England
    MS-Off Ver
    Office 365
    Posts
    110

    Re: Userform won't display unless a manual edit made first

    Thank you Nordie, appreciated.

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,675

    Re: Userform won't display unless a manual edit made first

    Glad I was able to help, thanks for the rep.

+ 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. Userform to display Log data; add, edit data, and navigate between records help
    By lfortis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2015, 08:11 PM
  2. userform to display data and edit it
    By robertogavilan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2014, 08:12 PM
  3. [SOLVED] Userform text box to display and edit a single cell only
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 5
    Last Post: 11-25-2013, 08:50 AM
  4. Autosubtracting a value from same cell a manual entry is made
    By tony324 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-04-2011, 02:10 PM
  5. [SOLVED] Cell format requires manual edit
    By [email protected] in forum Excel General
    Replies: 4
    Last Post: 09-27-2005, 05:05 PM
  6. [SOLVED] Edit Links: make update manual
    By Chrissorr in forum Excel General
    Replies: 5
    Last Post: 05-11-2005, 07:06 PM

Tags for this Thread

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