LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ina ina is offline
external usenet poster
 
Posts: 120
Default small fuction problem pass arguments

hello all,

I have one sub and one function; ma function need to calculate the
range from the activecell + size array.

this is the code;

Sub display_array()
Dim s(3, 3) As String
Dim arraysize As Integer
Dim rng As range

s(1, 1) = "A"
s(2, 1) = "B"
s(3, 1) = "C"

arraysize = 3

rng = selectRange(arraysize)


rng = s

End Sub


Function selectRange(size As Integer) As range
Dim arraysize, j, h As Integer
Dim newcolumn As String
Dim rng As range

arraysize = size

Dim addr As String
addr = ActiveCell.Address
j = ColRef2ColNo(addr)

h = j + arraysize

newcolumn = ColNo2ColRef(h)
range(ActiveCell, newcolumn + CStr(10)).Select

selectRange = rgn


End Function


I have a problem because my function is empty and I do not understand
why. Can someone help me on that?

Ina

 
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
How to pass variables as arguments of a function Excel-craze Excel Worksheet Functions 1 August 12th 09 11:48 AM
Can I pass arguments to my formatted empty spreadsheet file? Paul H[_2_] Excel Discussion (Misc queries) 3 July 25th 09 07:34 PM
How to pass arguments to vlookup in VBA mathewg Excel Programming 4 January 20th 06 12:34 PM
Run/execute VBS and pass arguments Claud Balls Excel Programming 3 February 4th 05 08:34 AM
How to pass arguments from ThisWorkbook to a UserForm strataguru[_4_] Excel Programming 1 October 7th 03 11:29 PM


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