SolidWorks Crashes when VBA is running

I have a macro that when I active the following statement theSW 2009 software crashes:
swApp.Visible = True
swApp.UserControl = True

However, when the statement is in "false" as shown below the SW2009 software does not crash.
swApp.Visible = False
swApp.UserControl = False

Does anybody knows what is the problems?
Thanks in advance.

MaperaliaSolidworksApi macros