ACC97: "Convert Macros to Visual Basic" Converts IncorrectlyID: Q167061
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you run the "Convert Macros to Visual Basic" command on a macro that
has any of the following RunCommand actions
RunCommand ArrangeIconsByCreated
RunCommand ArrangeIconsByModified
RunCommand ArrangeIconsByName
RunCommand ArrangeIconsByType
RunCommand StepInto
RunCommand FindNext
RunCommand HyperlinkDisplayText
DoCmd.RunCommand acCmdSortByCreated (ArrangeIconsByCreated)
DoCmd.RunCommand acCmdSortByModified (ArrangeIconsByModified)
DoCmd.RunCommand acCmdSortByName (ArrangeIconsByName)
DoCmd.RunCommand acCmdSortByType (ArrangeIconsByType)
DoCmd.RunCommand <blank> (StepInto)
DoCmd.RunCommand <blank> (FindNext)
DoCmd.RunCommand acCmdEnterEditMode (HyperlinkDisplayText)
Compile error
Variable not defined.
The "Convert Macros to Visual Basic" command on the Macro submenu, incorrectly converts the macro actions.
You must manually change the syntax for the RunCommand actions in the module.
The following table lists the correct syntax for the converted macro
actions.
Converted Syntax Correct Syntax
--------------------------------------------------
RunCommand ArrangeIconsByCreated DoCmd.RunCommand acCmdArrangeIconsBy
Created.
RunCommand ArrangeIconsByModified DoCmd.RunCommand acCmdArrangeIconsBy
Modified.
RunCommand ArrangeIconsByName DoCmd.RunCommand acCmdArrangeIconsBy
Name.
RunCommand ArrangeIconsByType DoCmd.RunCommand acCmdArrangeIconsBy
Type.
RunCommand StepInto DoCmd.RunCommand acCmdStepInto.
RunCommand FindNext DoCmd.RunCommand acCmdFindNext.
RunCommand HyperlinkDisplayText DoCmd.RunCommand acCmdHyperlinkDisplay
Text.
Macro Name Macro Action
---------------------------------
Macro1 RunCommand
RunCommand
RunCommand
RunCommand
RunCommand
RunCommand
RunCommand
Macro1 Actions
----------------------------------
RunCommand
Command: ArrangeIconsByCreated
RunCommand
Command: ArrangeIconsByModified
RunCommand
Command: ArrangeIconsByName
RunCommand
Command: ArrangeIconsByType
RunCommand
Command: StepInto
RunCommand
Command: FindNext
RunCommand
Command: HyperlinkDisplayText
For more information about converting macros, search the Help Index for "macros, converting," and then "convert macros to Visual Basic," or ask the Microsoft Access 97 Office Assistant.
Keywords : kberrmsg CnvErrs McrActn
Version : 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 27, 1999