LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Exctracting Literal Value From A String Variable

Try this:

--
AP

'----------------------------------------------
Sub testUnion()
SelectUnion 2, 4, "B", "D", "G", "I"
End Sub

Sub SelectUnion( _
RowPointer0 As Long, _
RowPointer1 As Long, _
ColumnPointer1 As String, _
ColumnPointer2 As String, _
ColumnPointer3 As String, _
ColumnPointer4 As String _
)
Dim r1 As Range
Dim r2 As Range
Dim r3 As Range
Dim r4 As Range

Set r1 = Range( _
Cells(RowPointer0, ColumnPointer1), _
Cells(RowPointer1, ColumnPointer1))
Set r2 = Range( _
Cells(RowPointer0, ColumnPointer2), _
Cells(RowPointer1, ColumnPointer2))
Set r3 = Range( _
Cells(RowPointer0, ColumnPointer3), _
Cells(RowPointer1, ColumnPointer3))
Set r4 = Range( _
Cells(RowPointer0, ColumnPointer4), _
Cells(RowPointer1, ColumnPointer4))
Union(r1, r2, r3, r4).Select
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
Use CountIf for a literal string chadkwelch Excel Worksheet Functions 3 March 21st 10 03:45 AM
Exctracting Literal Value From A String Variable rocketslinger[_5_] Excel Programming 0 March 8th 06 12:59 AM
setting a range variable equal to the value of a string variable Pilgrim Excel Programming 2 July 1st 04 11:32 PM
How do I convert an integer variable to a string variable? dumbass Excel Programming 2 May 21st 04 07:34 PM
User Defined Type Structure - want it to be variable not numeric literal WyoCracker Excel Programming 1 July 21st 03 09:28 PM


All times are GMT +1. The time now is 06:27 AM.

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"