View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
behnood behnood is offline
external usenet poster
 
Posts: 1
Default strange "subscript out of range" error!

hi
i have 3 workbooks:

program.xls
cost price phase one.xls
po payment.xls

i sheet1 of program i have a command button and i want when user clic
it some code execute.
but i get "subsript out of range error" and i can't undrestand why!

here is the line og code that vba stop on it during the execution:

Workbooks("cost price phase one").Worksheets(1).Cells(1, 2).Cop
Destination:=Workbooks("program").Sheets("sheet2") .Cells(1, 1)

any idea?
regards
Reza Behnoo

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