LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Script out of range error

Hi,

I'm not sure why I'm getting an error 'run-time error '9': script out
of range' at Windows(qfFile).Activate

Here is the code:

Sub ProcessCS()

Const qfPath = "C:\Documents and Settings\John\My
Documents\quoteprogramfiles\"
Const qrPath = "C:\Documents and Settings\John\My
Documents\CSQuotes\"
Const qrFile = "CSQuoteReport.xls"

' Check if you are in the quote or a processed quote
If isFile(qfPath & "CSQuoteForm.xls") = False Then
response = MsgBox("This quote has already been processed. Do
you want to create a new quote with a new quote number by copying this
already processed quote?", _
vbYesNo + vbQuestion)
qfFile = ThisWorkbook.Name
Else
response = vbNo
qfFile = "CSQuoteForm.xls"
End If

Windows(qfFile).Activate
Range("F3").Select
ActiveCell = q

I'm just a novice at this and would much appreciate the help. I'm
reading a VB book, but need to know quickly for a job I'm doing. Sorry
to be a pest.

Also, the file personal.xls keeps randomly opening and if anyone has a
hint where I can look to stop this, that would be great, too. I can't
even find the file.

Michele

 
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
VB script error Anthony Excel Discussion (Misc queries) 4 July 14th 05 09:45 AM
VB Script error Anthony Excel Discussion (Misc queries) 2 July 13th 05 03:09 PM
Macro script error - pls help !! Anthony Excel Discussion (Misc queries) 3 February 28th 05 01:49 PM
Script Error Mike Excel Discussion (Misc queries) 1 January 29th 05 12:32 AM
Run Time Error 9, Script Out of Range Jeff Marshall[_2_] Excel Programming 1 October 2nd 03 01:50 AM


All times are GMT +1. The time now is 02:15 PM.

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

About Us

"It's about Microsoft Excel"