Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Workbooks("program").WorkSheets("sheet2").Range("A 1") =
Workbooks("cost price phase one").Worksheets(1).Range ("A1") ).Value Patrick Molloy Microsoft Excel MVP Destination:=Workbooks("program").Sheets("sheet2" ).Cells (1, 1) -----Original Message----- 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 click 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).Copy Destination:=Workbooks("program").Sheets("sheet2" ).Cells (1, 1) any idea? regards Reza Behnood --- Message posted from http://www.ExcelForum.com/ . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
no differences
by the way i used copy method cause i want cell be copied with all value and forma i changed my code to what you wrote but again there is subscription out of range error(9 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
problem solved
i must use file names with extension (program.xls) insteed of (program thank |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Message "Subscript our of range" | Excel Discussion (Misc queries) | |||
Array as a "named range" - formula ok in cells, but error as "named range" | Excel Discussion (Misc queries) | |||
"Subscript of range" error | Excel Programming | |||
SaveAs "subscript out of range" error (COM - SOAP) | Excel Programming | |||
SaveAs "subscript out of range" error (COM - SOAP) | Excel Programming |