#16
That is what I thought with the color of the layer. But I will have to double check mine again because it doesn't change the color of the layer. It leave it white. So it is something in my code that is not right.

#17
tooldesigner,

Yes, there is something wrong with your code.

The problem using On Error Resume Next in routines is it will continue the routines and if VBA encounters an error, you cannot tell that it happened.

Place a single quote prior to the error trap to ensure it is overlooked and if an error occurs, VBA will halt execution of the code.

If this fails to disclose the problem,
place MsgBox "Layer Sub" in the MakeLayer subroutine so you can confirm that the routine is used.

If the MsgBox fails then ensure you have named the Tools module correctly and the CircleTest code point to Tools.

------------------
Regards
John Finlay
Don't want to post a question - email me direct on john@acecad.com.au

#19
tooldesigner,

So it is the rouge linetype that is the cause! – OK lets fix that one.

Simple – make sure you have “Continuous” or ActiveLinetype as the MlineType in our argument to the MakeLayer subroutine – this will solve the problem – check your spelling just to make sure – Programming – I don’t know why I started; the syntax is killing me!.

The reason for enforcing the LineType and not accepting the default “Continuous” is because I wanted the user to have flexibility in our tools subroutine for differing linetypes.

OH well I tried.

You could add code to the MakeLayer subroutine
MlineType = “Continuous” and force the MlineType, however this would be defeating the purpose.

As an error check add:
MsgBox MlayerTxt
early in the MakeLayer routine to observe the variable.

Persistence pays – you learn more from corrected program errors than copy and paste.


------------------
Regards
John Finlay
Don't want to post a question - email me direct on john@acecad.com.au

[This message has been edited by John Finlay (edited 08-21-2001).]

#20
OK I got it all fixed and working right. Thanks for your help. I also figured out why my color wasn't working right. I was folowing your code letter for letter. And there was a line where Mcolor was MColour. So I fixed that and my color working fine. Thanks again for your help and your time to help me learn this stuff.

#21
Good to here that you found the problem.

I have started VBA the Basic thread that may provide further insight into VBA.

Will start introducing some simple code examples soon.



------------------
Regards
John Finlay
Don't want to post a question - email me direct on john@acecad.com.au

[This message has been edited by John Finlay (edited 08-21-2001).]