Correct syntax for calling a sub routine in MS Office XP 2000 - 2003
Posted on 2006-05-26
Hi I've written a macro in MS office 2003 and i've just tested it in MS office 2002 and it works but i'm getting a Run-Time Error '5152', This is not a valid file name when the macro is run. In the VBA the code below is highlighted. Is there a way of calling a sub routine in 200 onwards which is now different to 2003 or could something else be wrong?
Private Sub cmd_ok_Click()
Call ActiveDocument.create_table '** THE ERROR HIGHLIGHTS THIS LINE **