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.
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