I added a macro to a form I created so that users would tab through the cells
in numerical order. After running the macro, I tested the form to ensure
that it was still working correctly. There are checkmark boxes in the
worksheet that are programmed with visual basic to transfer the data from
each row that users select to another sheet within the same workbook. Since
adding the macro, when I click a checkmark box, I get the error message:
quot;Compile error: Sub or Function not defined.quot; I click OK and then it takes
me to my VB programming:
Private Sub CheckBox5_Change() (This is highlighted in yellow)
Call startstop (This is selected with blue)
If I leave VB open, the form works the way it was intended to. If I close
VB, I get a message that says quot;This will stop the debuggerquot; and then the
worksheet doesn't work correctly. The macro I added is:
Sub AutoOpen()
Range(quot;D1,D2,D3,D4,D5,F1,F2,F3,F4,F5,N1quot;).Select
Range(quot;D1quot;).Activate
End Sub
Sub AutoOpen() is highlighted in yellow, since trying to use the checkmark
boxes.
Is there another step I need to do, or does this macro need to be inserted
into my VB code somewhere.
Susan
Susan
I assume that you have got a sub called startstop. This is the message
that you would expect if you hadn't
Martin
homepage.ntlworld.com/martin.rice1/--
mrice
------------------------------------------------------------------------
mrice's Profile: www.excelforum.com/member.php...oamp;userid=10931
View this thread: www.excelforum.com/showthread...hreadid=531908
- Feb 22 Thu 2007 20:35
Errors in VB Code since adding macro
close
全站熱搜
留言列表
發表留言