Dialog Box to rename a field
ElaP
Forums
Hi everyone,
I hope you are doing great. I would like to ask for a help.
I need a script to update a historical information and for that I renamed a column using a dialog box, but it is not working.
Hi Brian
Hi Brian
Thanks for your reply, but now I have a new error
(task.ReplaceField "SCORE", field) "The default field name is invalid. Field names may only contain letters, numbers and underscores and must begin with a letter."
I didn`t understand this error. Both variables name, the initial and the new one, has only letters and numbers, and begins with letter.
Thanks a lot
I think you are missing some
I think you are missing some quotes:
field.Name = """" & Dat & """"
There should be four quotes on each side. The two in the middle give you the single quote in the string. The two outer quotes are opening and closing the string. Right now the equation editor is seeing:
"DAT" and it doesn't know what to do with it. With the change it will instead see what is included in the Dat variable.