LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default macro error

7 users have their own copy of the a macro. 6 of them are using their copy
and not having an issue. The 7th one is getting incorrect results with their
own copy.

The macro (1) retrieves data from a template in the active workbook (WB1),
(2) opens a second workbook (WB2), (3) finds the first blank row in WB2, (4)
writes the data (from WB1) in the blank row in WB2, (5) "saves" WB2, and (6)
closes WB2.

Application screenupdating is turned off, so users don't see WB2 opening and
closing.

For 6 users, this works great and there aren't any issues. But the 7th user
is another matter.

This is the code to open WB2:

Workbooks.Open (vPath & vFile) ' both variables defined earlier
LogBook = ActiveWorkbook.Name

......then there is code to find the correct sheet and row in WB2.........

The issue occurs at this line of code (where the data is written in WB2):

ActiveCell = "CR" & a & b

For all other users, the activecell is the first blank row and column A in
WB2. For the 7th user, this line of code takes the user back to WB1 and
starts writing the data in the activecell in WB1.

Why? Any suggestions would be greatly appreciated. All users have Excel
2003. I have also tried it with screenupdating on and off and I get the same
results each time. I have also checked the references and they are the same
for all of the users. I'm stumped as to why this one user is getting
different results with the macro. Thanks for the help.
--
JT
 
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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
naming tab macro error runtime error 1004 D Excel Programming 3 February 28th 05 01:32 AM
Macro 'Automation error' with ChemOffice Excel macro Stew Excel Programming 0 October 27th 03 08:26 PM


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