Convert Macros to VBA and? 3rd request for HELP!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I converted all my Office 2007 (.accdb) macros to VBA after I finished my
project. Now none of my buttons work on any of my forms. They worked
perfectly when they were Macros but not after the wizard got a hold of them
and converted to VBA.
Please help 3rd request
 
Why was that necessary to do? You should have been able to keep them as
macros.

I haven't worked with 2007 enough to give you a strong answer, but my guess
is that the the buttons' On Click properties are not pointing to the VBA
code that now serves in place of the macros. Open the form in design view,
and check what you see for the On Click property value for one of the
buttons. Does it say "[Event Procedure]", or does it still have the name of
the macro there?
 
Ken,

No it says Event Procedure and the following code (basic one)...

Private Sub olk_Click()
On Error GoTo olk_Click_Err

DoCmd.OpenForm "frmMainSB", acNormal, "", "", , acNormal
DoCmd.close acForm, "frmAbout"


olk_Click_Exit:
Exit Sub

olk_Click_Err:
MsgBox Error$
Resume olk_Click_Exit

Ken Snell (MVP) said:
Why was that necessary to do? You should have been able to keep them as
macros.

I haven't worked with 2007 enough to give you a strong answer, but my guess
is that the the buttons' On Click properties are not pointing to the VBA
code that now serves in place of the macros. Open the form in design view,
and check what you see for the On Click property value for one of the
buttons. Does it say "[Event Procedure]", or does it still have the name of
the macro there?

--

Ken Snell
<MS ACCESS MVP>




TKM said:
I converted all my Office 2007 (.accdb) macros to VBA after I finished my
project. Now none of my buttons work on any of my forms. They worked
perfectly when they were Macros but not after the wizard got a hold of
them
and converted to VBA.
Please help 3rd request
 
While you're in design view at that Event Procedure box for the button,
click on the three-dot button at far right of property box. It should take
you to the code. Save and close the form, then open it in normal view and
try the button. It's possible that the code didn't correctly connect to the
event property.

--

Ken Snell
<MS ACCESS MVP>


TKM said:
Ken,

No it says Event Procedure and the following code (basic one)...

Private Sub olk_Click()
On Error GoTo olk_Click_Err

DoCmd.OpenForm "frmMainSB", acNormal, "", "", , acNormal
DoCmd.close acForm, "frmAbout"


olk_Click_Exit:
Exit Sub

olk_Click_Err:
MsgBox Error$
Resume olk_Click_Exit

Ken Snell (MVP) said:
Why was that necessary to do? You should have been able to keep them as
macros.

I haven't worked with 2007 enough to give you a strong answer, but my
guess
is that the the buttons' On Click properties are not pointing to the VBA
code that now serves in place of the macros. Open the form in design
view,
and check what you see for the On Click property value for one of the
buttons. Does it say "[Event Procedure]", or does it still have the name
of
the macro there?

--

Ken Snell
<MS ACCESS MVP>




TKM said:
I converted all my Office 2007 (.accdb) macros to VBA after I finished
my
project. Now none of my buttons work on any of my forms. They worked
perfectly when they were Macros but not after the wizard got a hold of
them
and converted to VBA.
Please help 3rd request
 
No here is what it says..

I'm getting the error Microsoft Visual Basic Compile error: Ambiguous name
detected: form_sb_Click.

This is driving me crazy and the customer is not happy either.
Any additional ideas? Thank you for all your help

Ken Snell (MVP) said:
While you're in design view at that Event Procedure box for the button,
click on the three-dot button at far right of property box. It should take
you to the code. Save and close the form, then open it in normal view and
try the button. It's possible that the code didn't correctly connect to the
event property.

--

Ken Snell
<MS ACCESS MVP>


TKM said:
Ken,

No it says Event Procedure and the following code (basic one)...

Private Sub olk_Click()
On Error GoTo olk_Click_Err

DoCmd.OpenForm "frmMainSB", acNormal, "", "", , acNormal
DoCmd.close acForm, "frmAbout"


olk_Click_Exit:
Exit Sub

olk_Click_Err:
MsgBox Error$
Resume olk_Click_Exit

Ken Snell (MVP) said:
Why was that necessary to do? You should have been able to keep them as
macros.

I haven't worked with 2007 enough to give you a strong answer, but my
guess
is that the the buttons' On Click properties are not pointing to the VBA
code that now serves in place of the macros. Open the form in design
view,
and check what you see for the On Click property value for one of the
buttons. Does it say "[Event Procedure]", or does it still have the name
of
the macro there?

--

Ken Snell
<MS ACCESS MVP>




I converted all my Office 2007 (.accdb) macros to VBA after I finished
my
project. Now none of my buttons work on any of my forms. They worked
perfectly when they were Macros but not after the wizard got a hold of
them
and converted to VBA.
Please help 3rd request
 
Ken,

I just tried some basic code snippts and that does not work either. None of
my code works even if I do it manually. Do I need to install the jet or?

Ken Snell (MVP) said:
While you're in design view at that Event Procedure box for the button,
click on the three-dot button at far right of property box. It should take
you to the code. Save and close the form, then open it in normal view and
try the button. It's possible that the code didn't correctly connect to the
event property.

--

Ken Snell
<MS ACCESS MVP>


TKM said:
Ken,

No it says Event Procedure and the following code (basic one)...

Private Sub olk_Click()
On Error GoTo olk_Click_Err

DoCmd.OpenForm "frmMainSB", acNormal, "", "", , acNormal
DoCmd.close acForm, "frmAbout"


olk_Click_Exit:
Exit Sub

olk_Click_Err:
MsgBox Error$
Resume olk_Click_Exit

Ken Snell (MVP) said:
Why was that necessary to do? You should have been able to keep them as
macros.

I haven't worked with 2007 enough to give you a strong answer, but my
guess
is that the the buttons' On Click properties are not pointing to the VBA
code that now serves in place of the macros. Open the form in design
view,
and check what you see for the On Click property value for one of the
buttons. Does it say "[Event Procedure]", or does it still have the name
of
the macro there?

--

Ken Snell
<MS ACCESS MVP>




I converted all my Office 2007 (.accdb) macros to VBA after I finished
my
project. Now none of my buttons work on any of my forms. They worked
perfectly when they were Macros but not after the wizard got a hold of
them
and converted to VBA.
Please help 3rd request
 
"Ambiguous name detected: form_sb_Click." means that you have more than one
routine named form_sb_Click


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


TKM said:
No here is what it says..

I'm getting the error Microsoft Visual Basic Compile error: Ambiguous
name
detected: form_sb_Click.

This is driving me crazy and the customer is not happy either.
Any additional ideas? Thank you for all your help

Ken Snell (MVP) said:
While you're in design view at that Event Procedure box for the button,
click on the three-dot button at far right of property box. It should
take
you to the code. Save and close the form, then open it in normal view and
try the button. It's possible that the code didn't correctly connect to
the
event property.

--

Ken Snell
<MS ACCESS MVP>


TKM said:
Ken,

No it says Event Procedure and the following code (basic one)...

Private Sub olk_Click()
On Error GoTo olk_Click_Err

DoCmd.OpenForm "frmMainSB", acNormal, "", "", , acNormal
DoCmd.close acForm, "frmAbout"


olk_Click_Exit:
Exit Sub

olk_Click_Err:
MsgBox Error$
Resume olk_Click_Exit

:

Why was that necessary to do? You should have been able to keep them
as
macros.

I haven't worked with 2007 enough to give you a strong answer, but my
guess
is that the the buttons' On Click properties are not pointing to the
VBA
code that now serves in place of the macros. Open the form in design
view,
and check what you see for the On Click property value for one of the
buttons. Does it say "[Event Procedure]", or does it still have the
name
of
the macro there?

--

Ken Snell
<MS ACCESS MVP>




I converted all my Office 2007 (.accdb) macros to VBA after I
finished
my
project. Now none of my buttons work on any of my forms. They worked
perfectly when they were Macros but not after the wizard got a hold
of
them
and converted to VBA.
Please help 3rd request
 
Back
Top