LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Recorded Macro Works, Code Doesn't

Figured it out.

The ActiveWindow.Visible = False code was recorded when there was a dialog
bog (for editing various chart properties) was closed, and
ActiveWindow.Activate was recorded when focus returned to the worksheet.

That's how the macro had those two lines.
--
Disregard, this is so I can find my post later.
***postedbyJay***


"Jay" wrote:

Hello all,

This is an question that I can't solve, but it's not a terribly important
issue.

I've been tasked to rewrite some macros that various users have recorded.
It's fairly straightforward and I don't have any problems. But there's two
lines of code that are all over the macro, and I can't figure out how they
were recorded. If I copy those two lines and try to run them
independently, it crashes. But the macro works fine by itself. I'm
wondering if I'm missing something, thought I'd throw it out there. Again,
this is just to satify my curiousity.

The lines a
ActiveWindow.Visible = False
ActiveWindow.Activate

These two lines appear maybe 5 times per macro. But the user can't remember
what they did, and I haven't been able to duplictate it.

I can duplicate each line, but not together (in that order). I have to hide
the sheet to get the first line, but activate doesn't work with a hidden
sheet.

Anyone smarter know what's going on?

Thanks,
Jay
--
Disregard, this is so I can find my post later.
***postedbyJay***



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Improving the code from a recorded macro Montse Excel Programming 2 September 17th 07 12:23 AM
Tidying Recorded Macro Code Big H Excel Programming 11 September 16th 07 06:29 AM
Manual Autofilter works, but recorded Macro does something else Peters Excel Programming 2 July 29th 07 10:00 PM
Call recorded macro from VBA code [email protected] Excel Programming 1 September 2nd 05 09:22 PM
looking to simplify a recorded macro with code HM Excel Programming 2 February 10th 04 06:35 PM


All times are GMT +1. The time now is 08:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"