VBA UserForm TextBox formatting...it used to work

Big Lar

Well-known Member
Joined
May 19, 2002
Messages
557
My 11yo VBA application worked until yesterday’s HD crash.
My backup copy for the replacement PC has
“Compile Error: Can’t find project or library”
issues with this and similar lines:

Code:
TextBox9.Value = Format(WS.Cells(iRow, 9).Value, "$ #.00")

The project works if I change the line to
Code:
TextBox9.Value = WS.Cells(iRow, 9)

However, the formatting is important for display readability and reports.

I’ve been many years retired and haven’t been keeping up. Corrective code assistance is appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

well I am not certain but have you checked all your Object Library is all checked there? If you had a crash mybe some got lost?
 
Upvote 0
Thanks for the suggestion.
"Missing - something or other"
I unchecked the box, closed and reopened the project.
It's working properly now!

Your "Hero Badge" is in the mail! ;)
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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