My question is pretty basic, really. What is the syntax to change the cell number format using an excel worksheet object through VBA?
For example, I have a column that I need to change from the "General" number format to a "Text" number format. Right now, this is the line of code that I'm trying to use:
wsWorksheet.Range("C2:C111"
.Cells.NumberFormat = "Text"
When this line executes, it does not change the format from "General" to "Text". It stays at "General". What am I doing wrong?
Thanks in advance.
cope22
For example, I have a column that I need to change from the "General" number format to a "Text" number format. Right now, this is the line of code that I'm trying to use:
wsWorksheet.Range("C2:C111"
When this line executes, it does not change the format from "General" to "Text". It stays at "General". What am I doing wrong?
Thanks in advance.
cope22