Show textbox value with click on a specific cell

Status
Not open for further replies.

MrThor

New Member
Joined
Aug 13, 2018
Messages
36
Hi

I have a combobox on my sheet1 in my workbook. When I click on a specifik cell I want a userform to pop up depending on this combobox value. Now I want to write my code on sheet2. How can I reffer to the combox from sheet1 in my code in sheet2? I cannot find the combobox in sheet 2 when I am searching for it because it is i sheet1, how do I do? I have a code down here.

Code:
Dim sh2 As WorksheetSet sh2 = Worksheets("Blad2")
Dim sh1 As Worksheet
Set sh1 = Worksheets("Dagbok")


'Januari'


If Not Application.Intersect(Target, Range("B5")) Is Nothing And Me.ComboBox1.Value = "Jan" Then
Jan1.Show


sh1.Range("A13:A21").Value = sh2.Range("B2:B10").Value
sh1.Range("B13:B21").Value = sh2.Range("C2:C10").Value
sh1.Range("D13:D21").Value = sh2.Range("E2:E10").Value

End If
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Status
Not open for further replies.

Forum statistics

Threads
1,216,073
Messages
6,128,646
Members
449,462
Latest member
Chislobog

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