Close Mode User Form Help

shaknark

New Member
Joined
Jun 7, 2015
Messages
3
Hi Guys

I have this code that when you click a shape a user form will pop up then when you close the user form another shape will appear. I want to repeat this process until the last shape appear. I cant upload the excel file, here's the code that I used I'm Stocked to the second shape.



copy to clipboard
Sub Oval1_Click()

List = 1

UserForm1.TextBox1.Text = Application.WorksheetFunction.VLookup(List, Sheet1.Range("b3:c7"), 2, False)
UserForm1.Show
End Sub

Sub Oval2_Click()

List = 2

UserForm1.TextBox1.Text = Application.WorksheetFunction.VLookup(List, Sheet1.Range("b3:c7"), 2, False)
UserForm1.Show
End Sub
the user form code which I want to repeat


copy to clipboard
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

If CloseMode = 0 Then
ActiveSheet.Shapes("Oval 5").Visible = True
End If
End Sub
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

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