|
-
September 26th, 2005, 02:34 AM
#1
vb to c#
I am not good in c# plz help to change the following code into c# syantaxxxx
NRecords = oEmployee.NumberOfRecords
If NRecords > 0 Then
For I = 1 To NRecords
With Worksheets(SHEETNAME)
myColumn = Range(StartCell).Columns.Column
Application.StatusBar = "Reading employee " & I & " of " & NRecords
.Cells(myRow, myColumn) = oEmployee.EmployeeID(I)
myColumn = myColumn + 1
s = oEmployee.EmployeeLastName(I) & ", " _
& oEmployee.EmployeeFirstName(I) & " " _
& oEmployee.EmployeeMiddleInitial(I) & "."
.Cells(myRow, myColumn) = s
myColumn = myColumn + 1
.Cells(myRow, myColumn) = oEmployee.AddressLine1(I)
.Cells(myRow, myColumn + 1) = oEmployee.SocialSecurityNumber(I)
.Cells(myRow, myColumn + 2) = oEmployee.Telephone(I)
.Cells(myRow, myColumn + 3) = YesNo(oEmployee.SalesRep(I))
myRow = myRow + 1
s = oEmployee.AddressLine2(I)
If (s <> "") Then
.Cells(myRow, myColumn) = s
myRow = myRow + 1
End If
.Cells(myRow, myColumn) = oEmployee.City(I) _
& ", " & oEmployee.State(I) _
& " " & oEmployee.Zipcode(I)
myRow = myRow + 2
End With
Next I
End If
Application.ScreenUpdating = True
Status = oEmployee.CloseData
End If
Done:
Set oEmployee = Nothing
Application.StatusBar = ""
End Function
plz help
faiza
-
September 26th, 2005, 03:12 AM
#2
Re: vb to c#
I suggest a Google search for "VB.NET C# convert" (without quotes) and you will find numerous Web sites that have code converters.
Edit:
Mind you, I'd recommend you turn Option Strict On in VB first and fix all the errors that arise from that first.
-
September 26th, 2005, 04:40 AM
#3
Re: vb to c#
thanks a lottt
i get my solution by search
faiza
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|