Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using XL97 SR2. This is more of a puzzle rather than a showstopper, but
I am curious. In my application, there is a cell that stores a foreman's diary. This is populated with a userform. Today I had one user getting an Error 7: Out of Memory when he entered a lot of text. I finally figured out why and when -- if the length of the string was 1024 *AND* it began with a hyphen (he uses the hyphen to do bullet points). It was fine if the length was < 1024 and began with a hyphen, or if it was 1024 and didn't begin with a hyphen. As far as I can tell(!), my code isn't bizarre in any way: Private Sub cmdOK_Click() Dim strDiary As String strDiary = Application.WorksheetFunction. _ Substitute(txtDiary.Text, Chr(13), "") ActiveWorkbook.Worksheets("Diary"). _ Cells(DIARY_ROW, DIARY_COL).Value2 = strDiary frmDiary.Hide End Sub For now, I've told him not to use the hyphen at the beginning of his diary -- a space or asterisk or anything else -- so we're working around it. I will eventually modify the code to detect an initial hyphen and remove it. Does anyone have any explanation for this? Or is it just a weird anomaly? -- Dianne |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Zero length string on chart | Charts and Charting in Excel | |||
Error message is Character Limit is over 1024 characters | Excel Discussion (Misc queries) | |||
Finding a string of unknown length in a string of unknown length, Help! | Excel Discussion (Misc queries) | |||
String length | Excel Discussion (Misc queries) | |||
How to find if a string starts with a digit | Excel Worksheet Functions |