View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech[_2_] Jim Rech[_2_] is offline
external usenet poster
 
Posts: 533
Default runtime 9 error

It appears that you've opted to "hide extensions of known file types" (a
Windows Folder Options setting) while the user where the macro failed did
not. It's better to use the workbook name rather than the window name if
possible:

Workbooks("Inbound inventory Analysis.xls").Activate

--
Jim
"Rpettis31" wrote in message
...
I run a macro that runs fine on my machine and some of the others in my
office. Yet for some reason this error continually occurs on certain
machines. Scenario is the workbook is open and clears data from sheets
opens
another file copies the data. However, when it returns to the orginal
workbook it gives the runtime 9 error.
This does not occur on my pc and some of my coworkers yet on others it
does.

' Go Back to inventory analysis and paste data
Windows("Inbound inventory Analysis").Activate {Error is on this line}
Sheets("$ Analysis").Select
ActiveSheet.Paste
ActiveWindow.ScrollColumn = 2