From UserForm dropdown list pick, Can't send to Worksheet Cell

Cacoethes

New Member
Joined
Jun 18, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Using Excel 2016 with Windows 8.1 Pro
Hello, I need some help. I must be missing something simple, because this works using Textbox values. When I use it as a dropdown list in a Combobox, it won't send until I close the UserFrom? My formula is Worksheets("Data").Range("B16") = Round_Cobo When I choose a dropdown Integer number from "Round_Cobo_Change(), It will not send the dropdown Value to the Worksheets("Data").Range("B16") until I close the UserForm, then it sends the last pick I chose. I need it to send the data when ever the Round_Cobo Dropdown changes.
I've tried making Round_Cobo a variable (Integer) then sent the Value with no change! I've tried placing ".Value" after it and no change. The Worksheet cell it's going to is set up as "General". I've tried as much as I can think of and obviously missing something?
If it's due to it being a Combobox (which I can't see why), then how do I correct this. Any variables needed are set up as Public!
Any help would be appreciated... I tried doing searches on your site but nothing I found helped my situation.

VBA Code:
Private Sub Round_Cobo_Change()
' Any change in choice of pan size

'----- Record Diameter chosen to Worksheet Data B16 ------------
[B]Worksheets("Data").Range("B16") = Round_Cobo[/B]

Call Show_Middle_Column

'----- Show option button to see Calories or not --------------------------
If (CaloriesT > 0) Then
    NoCaloriesEntered_txtbox.Visible = False
    Calories_cmd.Visible = True                                                    
Else
    Calories_cmd.Visible = False
    NoCaloriesEntered_txtbox.Visible = True
End If

Call Show_Custom_Slice_Option

'----- Make Combobox Highlight move to next choice -----------------
'Servings_Round.Controls(WidthNo_Slice_cobo.TabIndex).SetFocus

If (RoundChange = 5) Then
    Call Calories_Column_Calculations
    If (SomeVw > 0) Then
        Call Show_Right_Col_Custom_Slice
        Call CustSlice_Calories_Calculations
    End If
End If

End Sub
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
It works by me correctly.
Maybe SCREENUPDATING is set to FALSE
 
Upvote 0
I have used this in the past, might work for you

VBA Code:
''###### Combobox value to sheet 20
        ThisWorkbook.Worksheets("Sheet20").Range("G9").Value = UserForm1.Combox1.Value ' Change the sheet, cell, userform name and combo box name

I am referencing the userform as it is running from a module, you migh not need to do that

VBA Code:
ThisWorkbook.Worksheets("Data").Range("B16").Value = Round_Cobo.Value
 
Upvote 0
It works by me correctly.
Maybe SCREENUPDATING is set to FALSE

Hello Mart37, Yes the Application.ScreenUpdating was set to False, I changed to True
It works by me correctly.
Maybe SCREENUPDATING is set to FALSE
SOLVED...

Sorry I accidently Closed it before I was done... Yes the Application.ScreenUpdating was set to False, I changed it to True and it works now. I knew it had to be a simple over site on my part. Sometimes when you keep looking at something over and over again, you just don't see it. Thank you very much...

As for Sharid, I did try that but it didn't make any differences, it was the simple Application.ScreenUpdating! I did appreciate your thoughts and help, thankyou as well.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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