• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 28. Responding to Events with VB... > Converting Access Macros to VBA Code

Converting Access Macros to VBA Code

Many existing Access applications make extensive use of macros to automate form and report operations. You can use Access 97's macro-to-VBA code conversion feature to change all but AutoExec and menu macros to Access VBA procedures. Converting macros to VBA code aids in learning VBA programming in much the same manner as recording Excel 97 or Word 97 macros and then examining the resulting VBA code. The Wildfeeds application (28_wild.mdb), used in this conversion example, began as an Access 2.0 demonstration of the power of Access macros. Wildfeeds imports a fixed-width text file, Wildfeed.txt, that lists unscheduled satellite video programming available to C-band dish owners. Wildfeeds also demonstrates the power of Access's TransferText method.

Note

Wildfeeds is published monthly by Gary Bourgois as "Birdfeed" and is available in text format from http://www.nmia.com/~roberts/wildfeed (save the HTML page as Wildfeed.txt). The older version of Wildfeed.txt used with the Wildfeed application described in this section uses 12-hour HH:MM A/P starting time designations. The current version of "Birdfeed" uses 24-hour starting times (HHMM). You might find it an interesting exercise to modify 28_wild.mdb to accommodate the new text format with the 24-hour time field. (The 24-hour time format simplifies the programming considerably.)



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint