Popup Input Field When Opening Excel File

mjonesjr84

New Member
Joined
Sep 12, 2018
Messages
13
I have the code below to open the user input fields when the sheet first opens and it works fine.

Code:
Sub Auto_Open()

    ProjectInformation.Show


End Sub

My Project Information input field has info like date, quote number, location, room dimensions, system etc. It has 2 buttons on the first pop up form field that either closes the form field or moves to the next form field. On the 2nd form field there is 2 buttons to go back or to submit. The submit button runs the Save-As command to save the workbook.

My issue is that if I open the workbook again, it comes up blank. If I hit close button I put on the form it will keep all the original data that was input originally. If I hit submit to get the box to go away it will delete all the data that was input. I also have a button on the workbook that will open the input fields in the event I wanted to add or change info in the fields after the original info was put in. If I use this button, it will open with a blank input form.

I want the form fields to not open when opening the workbook after the workbook has been Saved-As. Does anyone have any ideas? I could email the file if that would help.
 
Last edited:
You should probably review some tutorial sites to get a handle on terminology and how to work in the VBE. Search for "Excel tutorial userform."

Sounds like you have the Developer Ribbon visible. That is just part of it. Click the Visual Basic icon in it or Alt+F11 to get to the VBE. Double click the userform ProjectInformation to open it. DoubleClick open area on it to open the object in code view. Or, View > Code, or F7.

I don't recommend using merged cells.

Code:
Sub Auto_Open()
  If Sheet1.Range("J2").value="" Then ProjectInformation.Show
End Sub
 
Last edited:
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You should probably review some tutorial sites to get a handle on terminology and how to work in the VBE. Search for "Excel tutorial userform."

Sounds like you have the Developer Ribbon visible. That is just part of it. Click the Visual Basic icon in it or Alt+F11 to get to the VBE. Double click the userform ProjectInformation to open it. DoubleClick open area on it to open the object in code view. Or, View > Code, or F7.
I posted one of the forms code in the post above yours on Page 1.

Is there not a way to check if a cell is blank when opening to determine if the Auto Open macro needs to be ran (macro to open the User Forms)?
 
Upvote 0

Forum statistics

Threads
1,214,528
Messages
6,120,065
Members
448,941
Latest member
AlphaRino

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top