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

Here is a line of code I'm having problems with:

Sub SingleDoor(SCell as Integer)
Range("A" & SCell + 5 ":C" & SCell + 10)

I know it is my syntax that is wrong. Can anyone help? I would like to
select the range of cell from A5:C10 if SCell is passed as 1.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Selecting a range in code

Hi
Range("A" & SCell + 4 &":C" & SCell + 9).select

--
Regards
Frank Kabel
Frankfurt, Germany
"JCanyoneer" schrieb im Newsbeitrag
...
Here is a line of code I'm having problems with:

Sub SingleDoor(SCell as Integer)
Range("A" & SCell + 5 ":C" & SCell + 10)

I know it is my syntax that is wrong. Can anyone help? I would like to
select the range of cell from A5:C10 if SCell is passed as 1.



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

Hey, you even spotted his mistaken math :-)

Bob


"Frank Kabel" wrote in message
...
Hi
Range("A" & SCell + 4 &":C" & SCell + 9).select

--
Regards
Frank Kabel
Frankfurt, Germany
"JCanyoneer" schrieb im Newsbeitrag
...
Here is a line of code I'm having problems with:

Sub SingleDoor(SCell as Integer)
Range("A" & SCell + 5 ":C" & SCell + 10)

I know it is my syntax that is wrong. Can anyone help? I would like to
select the range of cell from A5:C10 if SCell is passed as 1.





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

:-)
last efforts before quiting working for today :-)

He was really tricky also a missing apersand...)

--
Regards
Frank Kabel
Frankfurt, Germany
"Bob Phillips" schrieb im Newsbeitrag
...
Hey, you even spotted his mistaken math :-)

Bob


"Frank Kabel" wrote in message
...
Hi
Range("A" & SCell + 4 &":C" & SCell + 9).select

--
Regards
Frank Kabel
Frankfurt, Germany
"JCanyoneer" schrieb im
Newsbeitrag
...
Here is a line of code I'm having problems with:

Sub SingleDoor(SCell as Integer)
Range("A" & SCell + 5 ":C" & SCell + 10)

I know it is my syntax that is wrong. Can anyone help? I would like to
select the range of cell from A5:C10 if SCell is passed as 1.








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Selecting a range in code

in his other post, he missed 2 :-)

Bob


"Frank Kabel" wrote in message
...
:-)
last efforts before quiting working for today :-)

He was really tricky also a missing apersand...)

--
Regards
Frank Kabel
Frankfurt, Germany
"Bob Phillips" schrieb im Newsbeitrag
...
Hey, you even spotted his mistaken math :-)

Bob


"Frank Kabel" wrote in message
...
Hi
Range("A" & SCell + 4 &":C" & SCell + 9).select

--
Regards
Frank Kabel
Frankfurt, Germany
"JCanyoneer" schrieb im
Newsbeitrag
...
Here is a line of code I'm having problems with:

Sub SingleDoor(SCell as Integer)
Range("A" & SCell + 5 ":C" & SCell + 10)

I know it is my syntax that is wrong. Can anyone help? I would like

to
select the range of cell from A5:C10 if SCell is passed as 1.









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
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
VBA Code for selecting row [email protected] Excel Discussion (Misc queries) 2 June 9th 05 10:44 PM
VBA Code for selecting days Rob_NZ Excel Programming 0 August 24th 04 06:29 AM
Selecting cells for code Matt_16 Excel Programming 1 May 1st 04 06:26 PM
Selecting a PivotItem in code Robert E. Peterson Excel Programming 1 February 4th 04 06:30 PM


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