Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Select a range in code

I an writing a subroutine that passes a cell value and uses it to select
certain cells for manipulation. I would like to Select a range of cells to
set the properties on but cant get the syntax correct.

The code looks like this:
Sub SingleDoor(SCell as Integer)
Range("O" & SCell+5 ":Q" Scell+12).select
My problem is with the quotes. Any see the problem?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Select a range in code

JCanyoneer wrote:
I an writing a subroutine that passes a cell value and uses it to select
certain cells for manipulation. I would like to Select a range of cells to
set the properties on but cant get the syntax correct.

The code looks like this:
Sub SingleDoor(SCell as Integer)
Range("O" & SCell+5 ":Q" Scell+12).select
My problem is with the quotes. Any see the problem?


Range("O" & SCell + 5 & ":Q" & SCell + 12).Select

Alan Beban
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Select a range in code

Range("O" & SCell + 5 & ":Q" & SCell + 12).Select

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JCanyoneer" wrote in message
...
I an writing a subroutine that passes a cell value and uses it to select
certain cells for manipulation. I would like to Select a range of cells to
set the properties on but cant get the syntax correct.

The code looks like this:
Sub SingleDoor(SCell as Integer)
Range("O" & SCell+5 ":Q" Scell+12).select
My problem is with the quotes. Any see the problem?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Select a range in code

Hi
see your other post

--
Regards
Frank Kabel
Frankfurt, Germany
"JCanyoneer" schrieb im Newsbeitrag
...
I an writing a subroutine that passes a cell value and uses it to select
certain cells for manipulation. I would like to Select a range of cells to
set the properties on but cant get the syntax correct.

The code looks like this:
Sub SingleDoor(SCell as Integer)
Range("O" & SCell+5 ":Q" Scell+12).select
My problem is with the quotes. Any see the problem?



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
CODE 2 SELECT SHEETS LISTED IN A RANGE Faraz A. Qureshi Excel Discussion (Misc queries) 1 July 30th 09 07:31 AM
Code to select range Shawn Excel Discussion (Misc queries) 1 June 2nd 05 05:14 PM
select range from code Tommy[_8_] Excel Programming 1 September 2nd 04 12:12 AM
How do I select this range using code....another try at it. TBA[_3_] Excel Programming 2 January 14th 04 11:13 PM
How do I select this range using code? TBA[_3_] Excel Programming 2 January 14th 04 09:28 PM


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

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"