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 problem with array display

Hello Guys,

I have this function:

Function mafunction(ByVal client As String) as variant


Dim beginofmonth, endofmonth, startdate, currentdate, todaydate,
DateAuthor As Date
Dim i, r As Integer
Dim value As Variant


todaydate = Date
startdate = "12/03/2004"
endofmonth = getendofmonth(startdate)


i = 0

currentdate = endofmonth


While DateDiff("m", currentdate, todaydate) 0

currentdate = getnextday(currentdate)


If DateDiff("d", beginofmonth, currentdate) < 0 Then

value= Evaluate("na()") '
currentdate = beginofmonth

End If


Dim var(1000, 6) As Variant (here I have a problem )

DateAuthor = Date

r = 1

var(r, 0) = internalcode

var(r, 1) = currentdate

var(r, 2) = "ROOM"

var(r, 3) = "VACATION"

var(r, 4) = "COMMENTS"

var(r, 5) = DateAuthor

r = r + 1

currentdate = getnextendofmonth(currentdate)

Wend
mafunction = var ( I have a problem here)
End Function


'I would like to call my fuction from one sub

as

Sub test()

Dim ClientCode, Code As String

ClientCode = InputBox("Client Code", ClientCode)

Code = mafunction (ClientCode)

End Sub

I cannot display the array in my worksheet. I am newbie in vba
programming and I can not figure out where the problem is.

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
Display n x n array Jeff Excel Discussion (Misc queries) 2 September 25th 06 07:06 PM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM
VBA Array display problem johanvdv Excel Programming 1 September 8th 05 06:06 AM
Display the last value of an array pateodoro Excel Worksheet Functions 6 June 8th 05 07:41 PM


All times are GMT +1. The time now is 05:34 AM.

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"