Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ldd ldd is offline
external usenet poster
 
Posts: 1
Default Run time error-subscript out of range


I have developed an error report with a userform that when filled out
populates the error report, e-mails me a copy, and fills the necessary
information into another workbook. It seems to be working fine on all
the workstations that we have here at work with the exception of 3
workstations. When it is run on those three I get a "subscript out of
range" on those stations. The code runs up to the line where it is
supposed to find the empty row in the errordata file. The code stops
and returns an error at the last filled cell instead of looping to the
first empty cell. I have tried looking at the various settings and have
seen nothing out of the usual on these workstations. I will post the
code where it stops. I would appreciate any help. Thanks in advance.

*workbooks.open (\"\\file path\errordata.xls\")
workbooks(\"errordata\").sheets(\"data\").activate-this is the line
highlighted during the debug.
activesheet.range(\"a2\").select
' this selects the first empty row
do
if isempty(activecell) = false then
activecell.offset(1, 0).select
end if
loop until isempty(activecell) = true
'this copies the information into the error report data file
activecell.value = workbooks(\"error report\").sheets(\"error
report\").range(\"customer\").value
activecell.offset(0, 1) = workbooks(\"error
report\").sheets(\"error report\").range(\"partnumber\").value
activecell.offset(0, 2) = workbooks(\"error
report\").sheets(\"error report\").range(\"date\").value
activecell.offset(0, 3) = workbooks(\"error
report\").sheets(\"error report\").range(\"ordernumber\").value
activecell.offset(0, 5) = workbooks(\"error
report\").sheets(\"error report\").range(\"errortype\").value
activecell.offset(0, 6) = workbooks(\"error
report\").sheets(\"error report\").range(\"name\").value*[/b][/size]


--
ldd
------------------------------------------------------------------------
ldd's Profile: http://www.excelforum.com/member.php...o&userid=19157
View this thread: http://www.excelforum.com/showthread...hreadid=524876

Reply
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
Run-time error 9 (Subscript out of range) Lizz45ie[_3_] Excel Programming 3 October 26th 05 11:38 PM
run-time error '9': Subscript out of range AccessHelp Excel Programming 1 September 30th 05 05:10 PM
Run time error 9 : Subscript out of range JAtz_DA_WAY Excel Discussion (Misc queries) 6 August 29th 05 08:26 PM
Run time error '9' Subscript out of range Tina Excel Programming 1 August 25th 03 02:05 AM
Run time error 9 (subscript out of range) Nathaniel Tigere Excel Programming 2 August 5th 03 11:12 AM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"