LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Learning VBA-don't understand error message

Im starting to studying a new macro book that I just got, and in the current
section that Im in, there is section that is called Using user types with
arrays. They have a sample code that I typed in a new spreadsheet, but when
I run the macro, I get this error

cannot define a Public user-defined type within an object module

My code that is causing the error is this, and I have checked several times
that I have typed the code in correctly.

Type salesResults
spring As Single
summer AS Single
fall As Single
winter As Single
End Type

I have search the VBA help, to find out to try and correct this error, but
havent found anything that is close to answering it for me.

Can explain to me what I have done wrong.

Cal


 
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
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
Formula error, don't understand why... duugg Excel Discussion (Misc queries) 2 April 12th 06 06:52 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
dont understand compile error N E Body[_19_] Excel Programming 4 November 26th 04 05:08 PM
Don't understand External Data message BeSmart[_2_] Excel Programming 1 May 3rd 04 09:35 PM


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

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

About Us

"It's about Microsoft Excel"