Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Testing the current LEN() of all my entries I'm getting 2 more than desired.
I enter into textbox1 good (prssing the return key) With EnterKeyBehaviour = True Multiline = True Word Wrap = True =Len() against cell containg good = 6, not 4 "Bob Phillips" wrote: Private Sub CommandButton1_Click() With Sheets("Sheet1") .Cells(Rows.Count, "A").End(xlUp).Offset(1).Value = .TextBox1.Text End With With ActiveCell .Value = Application.WorksheetFunction.Substitute(.Value, Chr(13), "") End With With Sheets("Sheet1").TextBox1 .Text = "" .Activate End With End Sub -- __________________________________ HTH Bob "JMay" wrote in message ... Above occurs on Line 4 below Activecell.value = ....... My intent is to clean up the extra characters (return type) being entered into my cells. Perhaps there is a better way. But lost here... TIA Private Sub CommandButton1_Click() Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1).Value = Sheets("Sheet1").TextBox1.Text ActiveCell.Value = Application.WorksheetFunction.Substitute(ActiveCel l, char(13), "") With TextBox1 .Text = "" .Activate End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft Visual Basic: Compile error: Sum or Function not defined | Excel Worksheet Functions | |||
Microsoft Visual Basic: Compile error: Sum or Function not defined | Excel Programming | |||
Help With - Compile Error: Sub or Function Not Defined | Excel Programming | |||
"Compile error: sub or function not defined" | Excel Discussion (Misc queries) | |||
VBAProject name compile error, not defined at compile time | Excel Programming |