Can someone please tell me how to take the text in a cell and assign
it to a variable? I am trying to use the following code:
Dim A1str() As String
A1str = Range("A1").Value
but get the following error message:
-----------------------
Runtime-error '13':
Type mismatch
-----------------------
An example of the text in cell A1 is below (all in on line without
quotes), but will be different with each worksheet:
"CHR EGMLBMR Multilevel Bill Of
Materials Report 04/25/06 15:32 PAGE 1"
I ultimately want to shorten this text to contain 30 characters on
each side of "Multilevel Bill Of Materials Report", by removing extra
spaces, and write it back to cell A1 (as below).
"CHR EGMLBMR Multilevel Bill Of Materials
Report 04/25/06 15:32 PAGE 1"
My idea is to use Left$, Mid$, and Right$ functions to accomplish
this but can't seem to access the string in cell A1.