Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Susan
 
Posts: n/a
Default Errors in VB Code since adding macro

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:
"Compile error: Sub or Function not defined." 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 "This will stop the debugger" and then the
worksheet doesn't work correctly. The macro I added is:

Sub AutoOpen()
Range("D1,D2,D3,D4,D5,F1,F2,F3,F4,F5,N1").Select
Range("D1").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
  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default Errors in VB Code since adding macro


Susan

I assume that you have got a sub called startstop. This is the message
that you would expect if you hadn't

Martin

http://homepage.ntlworld.com/martin.rice1/


--
mrice
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=531908

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding the message body to a mailto macro Mike Excel Discussion (Misc queries) 0 March 28th 06 03:06 AM
VBA Code To have a macro repeat on all sheets in a workbook carl Excel Worksheet Functions 3 November 3rd 05 07:48 PM
Adding info in the row at the bottom using macro? Carrie Excel Discussion (Misc queries) 1 April 14th 05 04:18 PM
Zip Code Macro Ken Wright Excel Worksheet Functions 0 December 9th 04 07:55 AM
macro - adding rows to a column that is summed HGood Excel Discussion (Misc queries) 2 December 1st 04 03:28 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"