Boblysan

Boblysan

  • NA
  • 66
  • 0

Any VB folks out there...

Jun 30 2004 4:04 PM
Hey gang, YES, I am aware this is for C#, but I'm hoping there may be someone out there that can help me. I am looking for some assistance on how to get the below VB6 code modified to work in VB.NET. Once I get that far, I am going to try and get it to C#. I have already tried several converters, with no luck. So, if someone could PLEASE tell me how to get this converted and what the upgrade messages are wanting me to do, it would be extremely helpful. I have already looked at the MSDN reference for the upgrade errors and they do not make sense for what I am trying to do. Thanks, Private Sub cmdRunMacro_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdRunMacro.Click ' parmeters specified Dim paramList As Object Dim paramCount As Short If txtParamCount.Text <> "" Then paramCount = Val(txtParamCount.Text) 'UPGRADE_ISSUE: As String was removed from ReDim paramList(0 To paramCount - 1) statement. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1056"' ReDim paramList(paramCount - 1) 'UPGRADE_WARNING: Couldn't resolve default property of object paramList(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"' If paramCount > 0 Then paramList(0) = txtParameterName1.Text & "=" & txtParameterValue1.Text 'UPGRADE_WARNING: Couldn't resolve default property of object paramList(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"' If paramCount > 1 Then paramList(1) = txtParameterName2.Text & "=" & txtParameterValue2.Text 'UPGRADE_WARNING: Couldn't resolve default property of object paramList(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"' If paramCount > 2 Then paramList(2) = txtParameterName3.Text & "=" & txtParameterValue3.Text 'UPGRADE_WARNING: Couldn't resolve default property of object paramList(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"' If paramCount > 3 Then paramList(3) = txtParameterName4.Text & "=" & txtParameterValue4.Text 'UPGRADE_WARNING: Couldn't resolve default property of object paramList(). Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"' If paramCount > 4 Then paramList(4) = txtParameterName5.Text & "=" & txtParameterValue5.Text Else ' no parameters specified paramCount = 0 'UPGRADE_ISSUE: As String was removed from ReDim paramList(0) statement. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1056"' ReDim paramList(0) End If

Answers (1)