Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seding Row and index to another sub

Status
Not open for further replies.

AFK1

IS-IT--Management
Aug 26, 2005
38
US
I am using a TDBgrid. My users can select diffent rows in the grid and based on that selection I create a file.I need to send the index of the selected row and the bookmark to another sub.
my code is
Dim Bookmark As Variant
Dim i As Integer
If mMax > 0 And Grd.SelBookmarks.Count > 0 Then
For i = 0 To Grd.SelBookmarks.Count - 1
Call CreateFile(Grd.SelBookmarks(i, Array(miColumn1_COL, Bookmark )))
Next

When I run my code I get an error "Wrong number of arguments or invalid properity assigned."
Can someone help.
 
Where does the error comes up ?

grd.selbookmarks.count
grd.selbookmarks(i,array ...)
Array(micol,bookmark)
CreateFile
Go through your code in Debug, and look at the value of everything - this will help find what the problem is.
 
The error occurs at .SelBookmarks.
 
It seems that with SelBookmarks I can only send the index but not array. (My guess). Is there another way that I can send both?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top