The Macro recorder can take the blame. When you recorded the macro, you
selected that data file and you probably replaced what you selected with a
more generic table like the current sheet.
John. Visio MVP
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf
Of mickey11030
Sent: Saturday, January 28, 2012 4:48 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] VBA Is Putting Me In An Early Grave
After fiddling around a bit, I discovered the statement that was causing
trouble was
Windows("WildNewShoes.CSV").Activate
even though I could swear that statement was created by the macro recorder.
I deleted the statement and the program ran fine.
[Non-text portions of this message have been removed]
__._,_.___
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar