Hi,
I am trying to keep column G as text format. I would not like anyone to change the format as another program needs to read it as text.
so the format has to be for ex. 12/22/2014 or 12/01/2014 but text and users should not be allowed to change it.
What i had so far is not working, can anyone take a look see what I am doing wrong. What I did is basically run a macro when it opens and convert column G to text and when it closes run the macro convert column G to text. Is there a better way? Please help
I am trying to keep column G as text format. I would not like anyone to change the format as another program needs to read it as text.
so the format has to be for ex. 12/22/2014 or 12/01/2014 but text and users should not be allowed to change it.
What i had so far is not working, can anyone take a look see what I am doing wrong. What I did is basically run a macro when it opens and convert column G to text and when it closes run the macro convert column G to text. Is there a better way? Please help
Code:
Private Sub workbook_open()
Columns("G:G").Select
Selection.NumberFormat = "@"
End Sub
Private Sub workbook_beforeclose()
Columns("G:G").Select
Selection.NumberFormat = "@"
End Sub