Sabtu, 28 Januari 2012

Re: [ExcelVBA] VBA Is Putting Me In An Early Grave

 

For that statement to work, you would need to have that particular file open
at the same time as the other one you are working on.

When you recorded the macro, this was probably the case. You'd then get the
activate if you brought that second window to the front with the mouse, to
look at it.

If you want to reuse a recorded macro, then you need to keep the environment
the same as it was when you recorded it, or expect to need to edit the
recorded macro significantly.

Regards, Dave S

----- Original Message -----
From: "mickey11030" <mickey11030@yahoo.com>
To: <ExcelVBA@yahoogroups.com>
Sent: Sunday, January 29, 2012 8:47 AM
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.
>
>
>
> ------------------------------------
>
> ----------------------------------
> 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
>
> ----------------------------------Yahoo! Groups Links
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1416 / Virus Database: 2109/4773 - Release Date: 01/28/12
>

__._,_.___
Recent Activity:
----------------------------------
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