Currently, I have a macro that does a couple of things.
1) It deletes an table (e.g. Table1).
2) Then it imports all the data into a new table call Table1.
However, when the macro is cancelled, I will have an error when I try to re-run this macro. Error occurs because the macro was not able to find Table1 to delete (step 1).
I was thinking of having a condition check here. Meaning if Table1 do not exist, create Table1. Then proceed with Step 1 and 2. If Table1 exists, proceed to Step 1 and 2.
How and where can I do it? Under modules or procedures? I need the macro to recognise this condition.
Thanks in advance.
1) It deletes an table (e.g. Table1).
2) Then it imports all the data into a new table call Table1.
However, when the macro is cancelled, I will have an error when I try to re-run this macro. Error occurs because the macro was not able to find Table1 to delete (step 1).
I was thinking of having a condition check here. Meaning if Table1 do not exist, create Table1. Then proceed with Step 1 and 2. If Table1 exists, proceed to Step 1 and 2.
How and where can I do it? Under modules or procedures? I need the macro to recognise this condition.
Thanks in advance.