Userform textbox wordwrap/dare format rowsource

mahmed1

Well-known Member
Joined
Mar 28, 2009
Messages
2,302
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all


i have a problem on a few things


1) I have a text box where a value is populated automatically based on the colour selected. How do I have this textbox so that there is no cursor there and I can't select it and it's for read only?


2) I populate a cbo box with months from a sheet but the data show as numerical value and not dare format
ie cbodata.rowsource = "sheet1!h2:h20"


3) I have a text box to input notes rectangles shape
when input text, the text goes forever
how can I word wrap it so that when it goes to end of the size of textbox, it moves to next line
the word wrap is on so not sure why this ain't working

4) i also have 2 userforms. If i press add colour then this 2nd userform pops up with a colour picker. Once i select the colour, i change a lablel background in my userform1 and then i close this 2nd userform.
Now what i want to do is also have this userform2 (colour picker) pop up when i double click a cell and then once selected, change the cell called from/active cell colour to the colour picked. So this one will not refer to userform1.

so what i need is to have an if statement and see who called this userform 2
was it from a button on userform 1 or a cell on spreadsheet
if userform 1 then change label on userform1 colour to what i selected
or
if called by cell double click then change the active cell colour to what i selected

please help me
 
Thank you Andrew

Not sure what you still mean by how the cancel works?

is the default false?

How does it work as iv seen this cancel in save as method also

can you explain to me in steps how it works?
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
As I said it just cancels what would happen normally. Yes the default is False. It's there so that your code can perform some action other than the one set by Excel.
 
Upvote 0
Aaaaa is this right

for save as >>>>

it performs some checks n if those criteria aint met then it cancels the save as (disables it)
 
Upvote 0
I think i understand how this works but not sure what you mean by this and for the edit mode?

Cancel cancels what would normally occur when a cell is double-clicked, ie Edit mode if 'Allow editing directly in cells' is set.
 
Upvote 0
If you have set 'Allow editing directly in cells' in Excel Options, double-clicking a cell puts Excel in Edit mode. There is a cursor in the cell so that you can edit it.
 
Upvote 0
Thank you

sounds a silly question but how can i centre allign text on a label or userform?

i know how to make it centre text but it shows at the top middle

i want it in the centre
 
Upvote 0
Yep thats what i mean

how can i get around this
 
Upvote 0
HiAndrew

i managed to figure it out by adding another label on top.

i have 1 slight problem

i have a function set up that adds this range by colour
now at the minute if i add colour first in the cell and the input number the colour adds up fine
but if input number 1st and then add colour it wont update until the cell is physically changed
how can i get around this so it updates when colour is changed
i
tried application.calculate but that wont work
 
Upvote 0
To force a full recalculation you can press Ctrl+Alt+F9. Changing a cell's colour does not trigger a calculation. There is no workaround for that behaviour.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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