Shapes.ComboBox

Jabberwokki

New Member
Joined
Dec 2, 2020
Messages
33
Office Version
  1. 2010
Platform
  1. Windows
Hi there

Newbie posting for the first time so apologies if I don't provide the required detail....

I have the following code written in a module to select a number of macros based on the selection in the Shapes.ComboBox.

Sub TFSStatus_Change()

Dim c As ControlFormat
Set c = Sheet1.Shapes("TFSStatus_ComboBox").ControlFormat

'Choose which macro to run based on the selected value in the combobox

Select Case c.Value
Case 1: ipTimestamp
Case 2: compTimestamp
Case 3: backlogTimestamp
Case 4: blockedTimestamp
Case 5: nrTimestamp
End Select

End Sub

I'm looking to apply a default background and font colour (pre selection) and then a background colour change based on the combobox selection...

Any help would be greatly appreciated.

Regards

D
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi & welcome to MrExcel.
If you are talking about the background & font colour of a form control combo, then I'm afraid you are out of luck.
To the best of my knowledge there is no way to do that.
 
Upvote 0
Hi & welcome to MrExcel.
If you are talking about the background & font colour of a form control combo, then I'm afraid you are out of luck.
To the best of my knowledge there is no way to do that.
Okey Doky...Thank you for the response. Assume I would need an activeX ComboBx instead then?

Regards

D
 
Upvote 0
Yes you would, although ActiveX controls are notoriously flaky & best avoided.
 
Upvote 0
Ok....So maybe worth asking your advice then....
I'm creating a KanBan board. I'm looking to create a combobox as a status selection tool with entries 'In progress', 'Complete', 'Backlog' etc. I'd like to populate separate cells with timestamps based on when a new status is selected from the combobox and change the background colour of the combobox for visual clarity....i.e green for complete, blue for in progress, red for backlog etc...

What would you recommend?

Regards

D
 
Upvote 0
Why not use a Data Validation drop down. That way you can change the cell format as required.
 
Upvote 0
Why not use a Data Validation drop down. That way you can change the cell format as required.
That's actually how I have the status currently set up with conditional formatting applied to control the background fill based on the item selected. However, the timestamp in different ells then becomes an issue unless I use a circular formula.....
 
Upvote 0
You could use a worksheet change event looking at the cells with DV to add the time stamp.
 
Upvote 0
You could use a worksheet change event looking at the cells with DV to add the time stamp.
Ok cool. Really appreciate the advice....Thank you. I've not come across worksheet change events so I'll do some research and perhaps pick your brains again if needed?

Regards

D
 
Upvote 0
Ok, any problems just shout.
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,542
Members
449,316
Latest member
sravya

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