Existing working macro needs edit to be added

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,832
Office Version
  1. 2007
Platform
  1. Windows
Hi all,

I have the following macro but stuck with adding an edit to it

Code:
Sub RoundedRectangle5_Click()HondaParts.MyPartNumber.Value = ActiveCell.Value
HondaParts.Show
End Sub

When the macro runs i would like the value in the cell to be forced to upper case,value will be Numbers & Letters.
I added this to the macro but did not work.
Code:
.Range("B13").Value = UCase

Another request would be to add a space line when macro is run.

Example
So i would enter in cell B13 72147s9ae01

The macro should change to uppercase & add the space like so,
72147-S9A-E01

The form would then open and the value in cell B13 would be recognised.

Currently staff forget to either type in capitals or forget the space line -

Many thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi,
Like this,as it gives an error.

Code:
Sub RoundedRectangle5_Click().Range("B13").Value = UCase(Range("B13").Value)
HondaParts.MyPartNumber.Value = ActiveCell.Value
HondaParts.Show
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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