Userform combo box

D

Dave Peterson

It tells excel's VBA that you want to be forced to declare all the variables you
use.

That way, if you do something like:

Dim ctr1 as long
ctr1 = ctrl + 1

You won't have to spend hours finding the typo (1 vs l (one vs ell)).

You'd get a compile error right away.
Dave,

I have a quick question. What is the purpose of using the "Option
Explicit"? Thanks.
 
S

Souny

Good morning Dave,

Thank you very much for the detail explanation.

If I may, I would like to ask you a question on querytables. I have been
looking for the answer to that question, and I have not had any luck.

From the projects that I work on, I connect an Excel file to an Access
database to retrieve data. For the connection, I do not use code, instead I
connect them through Data > Import External Data > New Database Query. Part
of the connection setup, I give a querytable name and check the box "Save
query definition" in the External Data Range Properties. If I want to delete
the querytable that I created, I uncheck the Save Query Definition box on the
properties and delete the define name of that querytable. After I uncheck
and delete the define name of that querytable, when I recreate a new
querytable using the same querytable name that I just deleted, I would not
able to use it. I receive an error message that the name is already exist on
that sheet.

I thought I deleted, and why would the querytable name still exist? Is
there a way to delete the querytables permanently so that when I want to use
the same name again, I would be able to use it?

Thanks.
 
D

Dave Peterson

I don't work with querytables enough to know.

If you don't get an answer in this thread, you may want to start a new one. You
may get more eyeballs.
Good morning Dave,

Thank you very much for the detail explanation.

If I may, I would like to ask you a question on querytables. I have been
looking for the answer to that question, and I have not had any luck.

From the projects that I work on, I connect an Excel file to an Access
database to retrieve data. For the connection, I do not use code, instead I
connect them through Data > Import External Data > New Database Query. Part
of the connection setup, I give a querytable name and check the box "Save
query definition" in the External Data Range Properties. If I want to delete
the querytable that I created, I uncheck the Save Query Definition box on the
properties and delete the define name of that querytable. After I uncheck
and delete the define name of that querytable, when I recreate a new
querytable using the same querytable name that I just deleted, I would not
able to use it. I receive an error message that the name is already exist on
that sheet.

I thought I deleted, and why would the querytable name still exist? Is
there a way to delete the querytables permanently so that when I want to use
the same name again, I would be able to use it?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top