Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to John for the code below which copies data from up to 10 text boxes
on a user form to a worksheet. My query is can the lower case "v" be formatted to be in bold and coloured red when copied to the worksheet? Private Sub CommandButton2_Click() Dim LastRow As Object Dim DataStr As String Dim na As Integer Set LastRow = Sheet1.Range("f4000").End(xlUp) For na = 1 To 10 v = " " If na = 6 Then v = " v " DataStr = DataStr & v & _ StrConv(Me.Controls("TextBox" & na).Text, _ vbProperCase) Next na LastRow.Offset(0, -1).Value = Trim(DataStr) 'copies text box data to cell For na = 1 To 10 Me.Controls("TextBox" & na).Text = "" Next na Me.Hide End Sub Thanks in advance -- Traa Dy Liooar Jock |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text format - setting text colour with code | Excel Discussion (Misc queries) | |||
Conditionl format a cell to change text colour | Excel Discussion (Misc queries) | |||
Conditional Format to Retain Text Colour from a List on another Sh | New Users to Excel | |||
Can i format (colour) selective text in a cell using excel2000? | Excel Discussion (Misc queries) | |||
Ensuring a cell is copied in text format | Excel Programming |