Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following macro will create a value in cell A2 that has more than
32k characters. Sub foo() Range("A1").Value = String$(2 ^ 15 - 1, "a") Range("A2").Formula = "=Substitute(A1, ""a"", ""ab"")" Range("A3").Formula = "=len(A2)" End Sub If you now save this workbook, it will not be openable by excel. We discovered this behavior quite by accident when replacing the tab character in a cell with spaces. Unfortunately, the cell contained a large text fragment, and when expanded it was 32k chars. Because the workbook is fine until it is saved and reopened, and because the worksheet had nearly 1 million cells, it took a while to track down. Are there other ways to make seemingly valid workbooks that cannot be opened? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to substitute a value for calculation with a column of values | Excel Worksheet Functions | |||
message 'hyperlink can be harmful warning..etc...' | Excel Discussion (Misc queries) | |||
what is used for cell entries that are considered subsections of . | Excel Discussion (Misc queries) | |||
Substitute worksheet function | Excel Programming | |||
Using a function from a vba add-in: is that considered an external link | Excel Programming |