Userform Activation - Only once within cell upon Enter key (VBA)

elitef

Board Regular
Joined
Feb 3, 2016
Messages
58
Hello everyone

Really hoping someone can help me as I have been stuck all day trying to figure this out...
I have a spreadsheet which I am working on. I have VBA code which enables a userform depending on the value of a cell

VBA Code:
Private Sub Worksheet_Change(byVal Target As Range)
If [A1].Value = "OTHER" Then
UserFormBox.Show
End If
End Sub

A1 is a drop down via Data Validation with 1,2,3,OTHER
As soon as Other is selected the userform box opens.

The userform that opens is a box with a single text field in it and an OK button. Upon clicking the OK button, it puts the value of the text field in B1

THE ISSUE THAT I AM HAVING IS:

Every time i go into any other cell and press enter in it, it displays the userform box again and again
I need the box to only be displayed when "OTHER" is selected in A1, but nowhere else.

I really hope someone can help me because I am totally clueless at this point...
 
So show me the script that loads values into The Combobox

Normally a Combobox is used to load in several values and then user selects the value he wants
If you choose Userform1 then userform1 is shown
If you choose Userform2 then Userform2 will be shows

Not sure why your wanting to choose "OTHER" to show Userform1

But the Combobox1 script would say if combobox1.value="OTHER" then UserForm1.show
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
So show me the script that loads values into The Combobox

Normally a Combobox is used to load in several values and then user selects the value he wants
If you choose Userform1 then userform1 is shown
If you choose Userform2 then Userform2 will be shows

Not sure why your wanting to choose "OTHER" to show Userform1

But the Combobox1 script would say if combobox1.value="OTHER" then UserForm1.show

Thats a sample file
The A1 has data validation in it in the background of the combo box which is there.
I need to make sure that the Combobox works to popup the UserFormBox

Reason being, the environment where I am using, the list is a lot longer than just 10 choices, more like 200 choices if not more, and I need the box to autofill as you're typing to simplify it.
 
Upvote 0
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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