View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
M J M J is offline
external usenet poster
 
Posts: 3
Default VBA application; Subscript Out of Range

Hi

My problem occurs when I click a button to open another
excel file from a macro within a separate excel file. I
think the code and error occurs simply from the following
lines of code:

On Error GoTo ErrorHandler:
filepath = ActiveWorkbook.Path & "\" & filename & ".xls"
oApp1.Workbooks.Open filepath

I am not using any network mappings to find the files. In
fact, I saved all the files on the local C:\ on my
coworkers computer.

When I click the button, I get a "Subscript out of Range"
error and for some reason, the excel file I'm tryin to
open gets locked for editing.

??


-----Original Message-----
It is unlikely that your problem is the version of

VBA/Excel your
coworker is using. The most likely explanation based on

what I know so
far, which isn't much, is that the file your code is

opening is on your
network and the network drive where it is located is

mapped differently
on your coworker's computer. Check that out and let me

know how that
works out. - Pikus


---
Message posted from http://www.ExcelForum.com/

.