Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / July 2004

Tip: Looking for answers? Try searching our database.

Converting VB6 Macro to VB.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roplab - 29 Jul 2004 20:24 GMT
Hi Everyone,
                   I am new to VB.NET and I have been give a task to
convert our old VB6 Macro template to VB.NET Template and some of the code I
have to convert is the on below. My question  can anyone put me in the write
direction on how to convert this code

Thanks in advance
-Ralph

Private Sub lsbParaLegal_Click()
Dim MyArray()

   vPL = lsbParaLegal.Value

   Set db = OpenDatabase("G:\FCMerge\FCMerge.mdb")
   Set rs = db.OpenRecordset(vPL)
   rs.Index = "TEMP_FILE__"

   lsbFiles.Clear

   lsbFiles.ColumnWidths = "0;75"

   optPSHFile.Value = True

   ReDim MyArray(rs.RecordCount, 3)

   'Load integer values MyArray

   MyArray(0, 0) = 0
   MyArray(0, 1) = "<Add New...>"

   For i = 1 To rs.RecordCount
       MyArray(i, 0) = rs.Fields(0)
       MyArray(i, 1) = rs.Fields(1)
       MyArray(i, 2) = rs.Fields(14)
       rs.MoveNext
   Next i

   lsbFiles.List() = MyArray

   rs.Close
   db.Close

End Sub
Mike Hernandez [MSFT] - 30 Jul 2004 19:36 GMT
Hi Ralph:

I believe your question will be answered more quickly if you post it on the
microsoft.public.vsnet.general newsgroup.

Thanks!
Mike Hernandez [MSFT]

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.