Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Deselet first 3 rows in selection

hi.

I have a range selected, but i need to unselect the first 3 rows in that
selection. Note that the selection isnt constant.
How can i do that in VBA

Thanks
SpeeD
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Deselet first 3 rows in selection

As ALWAYS, post your code for comments
Sub selectit()
Range("f7").Offset(3).Resize(, 4).Select
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"SpeeD" wrote in message
...
hi.

I have a range selected, but i need to unselect the first 3 rows in that
selection. Note that the selection isnt constant.
How can i do that in VBA

Thanks
SpeeD


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Deselet first 3 rows in selection

Sub dural()
t = Selection.Address
s = Split(t, ":")
u = Split(s(0), "$")
u(2) = u(2) + 3
v = Join(u, "$")
w = v & ":" & s(1)
Range(w).Select
End Sub

--
Gary''s Student - gsnu200829


"SpeeD" wrote:

hi.

I have a range selected, but i need to unselect the first 3 rows in that
selection. Note that the selection isnt constant.
How can i do that in VBA

Thanks
SpeeD

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default Deselet first 3 rows in selection

give this a try, just make sure the the line after the if line is all on 1 line
in case it wraps when posted.

Sub remove3()
If Selection.Rows.Count 3 Then
Rows(Selection.Range("A1").Row).Offset(3).Resize(S election.Rows.Count
- 3).Select
End If
End Sub


--


Gary K



"SpeeD" wrote in message
...
hi.

I have a range selected, but i need to unselect the first 3 rows in that
selection. Note that the selection isnt constant.
How can i do that in VBA

Thanks
SpeeD


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Deselet first 3 rows in selection

Thank you all for the help!!!
Ill give it a try first thing in the morning (it´s 23:14 where i live).

.... And post the final code in here...

SpeeD


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
Using For...Each...Next with a selection of rows ybazizi Excel Programming 2 July 31st 07 10:38 PM
Object Type of a selection... counting rows in a selection Acid-Sky[_2_] Excel Programming 3 August 23rd 05 09:53 AM
VBA Code for selection rows [email protected] Excel Programming 3 June 10th 05 01:29 AM
getting the column and rows from a selection Andy K[_2_] Excel Programming 2 November 18th 04 03:08 PM
Selection of Rows Alan Excel Programming 2 June 30th 04 05:32 PM


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