By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,333 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,333 IT Pros & Developers. It's quick & easy.

Passing an Array

P: n/a

Hello,
I am trying to build a UI and I need the user to go though about 4 forms
making decisions and then passing the decision to the next form. Finally
on the last form I need all the answers to open the next and final form,
which there are 16 different ways to go. So I thought by putting the
decisions in an array, and passing it to each form. I get this error-:
Value of type '1-dimensional array of String' cannot be converted to
'String'.

Here is an example of my code:

dim PFINFO() as string
BTNCLICK EVENT

PFINFO(0) = "F"
Dim f As New frmchooseType(pfinfo)
f.show()
Me.Close()

NEW FORM:

Public sub new(byref p as string)
mybase.new
initializecomponent()

Dim PFINFO() as string
PFINFO = P
end sub

Any help would be great

Tom

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Thomas Beyerlein" <tb***@yahoo.com> wrote in message
news:e2**************@TK2MSFTNGP10.phx.gbl...

Hello,
I am trying to build a UI and I need the user to go though about 4 forms
making decisions and then passing the decision to the next form. Finally
on the last form I need all the answers to open the next and final form,
which there are 16 different ways to go. So I thought by putting the
decisions in an array, and passing it to each form. I get this error-:
Value of type '1-dimensional array of String' cannot be converted to
'String'.

Here is an example of my code:

dim PFINFO() as string
BTNCLICK EVENT

PFINFO(0) = "F"
Dim f As New frmchooseType(pfinfo)
f.show()
Me.Close()

NEW FORM:

Public sub new(byref p as string)
mybase.new
initializecomponent()

Dim PFINFO() as string
PFINFO = P
end sub

Any help would be great

Tom

You told it in the new that you wanted a string parameter rather than a
string() parameter. It is telling you that it cannot convert a string array
to a string.
Nov 21 '05 #2

P: n/a
"Thomas Beyerlein" <tb***@yahoo.com> schrieb:
So I thought by putting the
decisions in an array, and passing it to each form. I get this error-:
Value of type '1-dimensional array of String' cannot be converted to
'String'.

Here is an example of my code:

dim PFINFO() as string
BTNCLICK EVENT

PFINFO(0) = "F"
Dim f As New frmchooseType(pfinfo)
f.show()
Me.Close()

NEW FORM:

Public sub new(byref p as string)


=> '...(ByVal p() As String)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.