clearing to nothing?

J

judith

I seem to remember seeing somewhere that declarations need to be cleared and
think I am having a problem in this area.

If i run a set of code (saving to excel and copying some data between
workbooks) it works perfectly the first time but not if I immediately repeat
it. If i run a different set of code then repeat the first code it seems to
be OK.

I am declaring

Dim strFilter As String
Dim strInputFileName As String
Dim strInputFilePath As String

Dim xlApp As Excel.Application
Dim xlWorkBook1 As Workbook
Dim xlWorkBook2 As Workbook

Do I need to somehow clear these before using them?
 

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