paulked
04-30-2008, 06:34 AM
Hi all
I need to remove invalid characters from cells.
Cells G7:G10 contain up to 2 characters each and G12 contains a concatenation of these.
Cells I7:I10 contain up to 2 characters each and I11 contains a number, I12 contains a concatenation of I7:I11.
The Cells G7:G10 and I7:I11 are read in from an external source (A PLC in this case) and if they are not used by the PLC they can contain any weird character.
For example:
G7 = "EA", G8 = "SK", G9 = "Y-", G10 = "13" & therefore G12 = "EASKY-13". This is the directory I want to save the file in.
I7 = "BU", I8 = "BX", I9 = "J", I10 ="", I11 = "551" & therefore I12 = "BUBXJ551". This is the filename of the sheet I want to save.
But, in reality, as only one character of I9 and none of I10 are used get unusual characters in place of blanks. This causes the VBA to crash as the file cannot be saved.
:help Is there a way to ged rid of any invalid characters from these cells before saving the file?
Many thanks
Paul Ked
I need to remove invalid characters from cells.
Cells G7:G10 contain up to 2 characters each and G12 contains a concatenation of these.
Cells I7:I10 contain up to 2 characters each and I11 contains a number, I12 contains a concatenation of I7:I11.
The Cells G7:G10 and I7:I11 are read in from an external source (A PLC in this case) and if they are not used by the PLC they can contain any weird character.
For example:
G7 = "EA", G8 = "SK", G9 = "Y-", G10 = "13" & therefore G12 = "EASKY-13". This is the directory I want to save the file in.
I7 = "BU", I8 = "BX", I9 = "J", I10 ="", I11 = "551" & therefore I12 = "BUBXJ551". This is the filename of the sheet I want to save.
But, in reality, as only one character of I9 and none of I10 are used get unusual characters in place of blanks. This causes the VBA to crash as the file cannot be saved.
:help Is there a way to ged rid of any invalid characters from these cells before saving the file?
Many thanks
Paul Ked