LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Works in module but not in project

I created the following module by doing a macro record. It works by running
it within the module but when I put in a project, I get a 1004 error on the
range select. The xls file is visable while I am stepping (F8). I even did
a call statement and get the same error and change the project from Private
to Public. What am I missing?

Workbooks.Open Filename:="C:\temp\jul 07.xls"
Worksheets(2).Activate
Range("B216:Y242").Select
Selection.Copy

John


 
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
why stepping thru works differently module vs. worksheet Susan Excel Programming 5 February 13th 07 06:09 PM
when to use a module & when to use a project Sally Excel Programming 1 July 5th 06 11:30 AM
Import module in protected project? [email protected] Excel Programming 0 January 5th 05 07:38 PM
Module Names within a Project WSF Excel Programming 2 May 15th 04 11:51 PM
Remove VBA Project module TMR Excel Programming 0 December 11th 03 07:04 PM


All times are GMT +1. The time now is 02:23 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"