LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Range.Value fails

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
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
Excel VBA Paste of Range with PrefixCharacter fails from VB.NET Nicholas Dreyer Excel Discussion (Misc queries) 0 April 6th 07 04:09 AM
Select range fails Geoff Excel Programming 6 August 16th 05 06:53 AM
select method of range class fails mark kubicki Excel Programming 12 April 27th 05 02:37 PM
Named Range Fails in VBA Code Dean Hinson[_3_] Excel Programming 3 January 24th 05 03:48 PM
Select method of Range fails J West Excel Programming 1 June 7th 04 02:41 PM


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