76814

Why, after launching a userform from a userform, does unloading the 2nd userform close both?

Question:

A button on a worksheet launches a macro that opens a userform (say, userform1). Userform1 is loaded non-modal in order for the user to use both userform1 and the worksheet (i.e., click cells) for input. There is a button on userform1 that, when clicked, opens another userform (say, userform2). Userform2 is modal. Clicking a Cancel button on userform2 unloads userform2 as it is supposed to; however, it, for some reason, also unloads userform1, which I do not want. If I make userform1 modal, then unloading userform2 does not unload userform1; however, the user can no longer use (i.e., click) the cells in the worksheet. I cannot find any info that will give me a clue as to why unloading one userform unloads both.

Answer1:

UserForm2.Show

a = 1 ' only 1 more line of any code to execute

this will do the trick. At least this worked for me with the same issue...

Recommend

  • uploading image in a form using codeigniter/ajax
  • Get the values from the multiple checkbox and append it to html?
  • How can I display a yes/no message box to the user in Javascript?
  • Getting java.lang.IllegalStateException: This call must happen in the AWT Event Dispatch Thread! Ple
  • Zurb Joyride not following defined order
  • Turn off Zurb Foundation 5 meta tags
  • Ionic Decrease Scroll Speed
  • Angular class directive on bootstrap ui modal
  • Qt: closing modal dialog closes the program
  • $this->db->insert_id(); returning 0 every time in codeigniter [duplicate]
  • .on not working on dynamic html
  • JQuery UI Multiple Dialog Issue
  • jQueryUI dialog replacement for confirm?
  • CSS: How to fix overlapping divs
  • How to remove all of a jQuery UI dialog when it is closed
  • cell spacing in div table
  • How can I make this modal persistent?
  • Selenium to click on a javascript button corresponding to a text
  • Excel's Macro-Recorder usage
  • Detect when Facebook like button is clicked
  • Breeze - Deleted Items nav properties bug
  • Java Scanner input dilemma. Automatically inputs without allowing user to type
  • Why ng-show works with ng-repeat but ng-if doesn't? [duplicate]
  • javaw.exe and eclipse startup problems
  • recyclerView does not call the onBindViewHolder when scroll in the view
  • Excel - Autoshape get it's name from cell (value)
  • vba code to select only visible cells in specific column except heading
  • what is the difference between the asp.net mvc application and asp.net web application
  • To display the title for the current loaction in map in iphone
  • jquery mobile loadPage not working
  • Data Validation Drop Down Box Arrow Disappearing
  • Matrix multiplication with MKL
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • How do you join a server to an Active Directory (domain)?
  • need help with bizarre java.net.HttpURLConnection behavior
  • Authorize attributes not working in MVC 4
  • Busy indicator not showing up in wpf window [duplicate]
  • Binding checkboxes to object values in AngularJs
  • Python/Django TangoWithDjango Models and Databases
  • Net Present Value in Excel for Grouped Recurring CF