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: 134
Default problem referring to Range and Cells

The program halts and I get a Run-time error '1004' when I run the followin
code from Sheet1. But it works fine when I run it from Sheet2. Any ideas

Thanks

Kevi

Sub test(
Dim Message As Strin
Message = MsgBox("This test # 1"
With Worksheets("Sheet2").Range(Cells(3, 1), Cells(3, 5)
Message = MsgBox("This test # 2"
With .Borders(xlInsideVertical
.LineStyle = xlContinuou
.Weight = xlThi
.ColorIndex = xlAutomati
End Wit
End Wit
End Sub
 
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
Referring to first cell in a range FARAZ QURESHI Excel Discussion (Misc queries) 5 December 26th 07 05:14 PM
Formula referring to a dynamic range in a different workbook mr tom Excel Worksheet Functions 6 March 29th 07 08:56 AM
How do I use indirect when referring to a named range in a closed Ed Green Excel Worksheet Functions 3 May 22nd 06 08:01 PM
Selecting a range without referring to specific cells abxy[_21_] Excel Programming 5 February 9th 04 01:25 AM
Referring to a user-selected range James Mc Excel Programming 2 January 27th 04 07:46 AM


All times are GMT +1. The time now is 06:55 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"