Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A function can only return a value. In this case, PutVectorInRange should
return a value of True or False as you have defined it as Boolean. However, you don't actually set the value of the function anywhere within the function. You cannot set/change the value in another cell or range within a function. Regards Trevor "vga1976" wrote in message ... Sorry, this is the code Function PutVectorInRange(vector As Variant, xlWs As Excel.Worksheet, iCol As Integer, lRow As Long) As Boolean Dim xlRange As Excel.Range Dim lSize As Long, vColVector As Variant If Not IsEmpty(vector) Then lSize = UBound(vector, 1) - LBound(vector, 1) Set xlRange = xlWs.Range(xlWs.Cells(lRow, iCol), xlWs.Cells(lRow + lSize, iCol)) 'convert the row vector to column vector vColVector = DepConvertRowVectToColVect(vector) xlRange.Value = vColVector End If End Function -- vga1976 ------------------------------------------------------------------------ vga1976's Profile: http://www.officehelp.in/member.php?userid=5683 View this thread: http://www.officehelp.in/showthread.php?t=1310532 Posted from - http://www.officehelp.in |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel VBA Paste of Range with PrefixCharacter fails from VB.NET | Excel Discussion (Misc queries) | |||
Select range fails | Excel Programming | |||
select method of range class fails | Excel Programming | |||
Named Range Fails in VBA Code | Excel Programming | |||
Select method of Range fails | Excel Programming |