473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

please help me again

help a dumb newbie
iam using vba with excel 2000. iam trying to create a class

Option Explicit
Public swap As swapdb
Private m_number As Byte
Private m_units, m_notional, m_libor, cvalue As Double
Private m_name, m_ticker As String
Private m_td, m_exdate, m_r1, m_r2, m_r3, m_r4 As Date

Public Property Get addnumber() As Double
addnumber = m_number 'new swap #
End Property

Public Property Let addnumber(ByVal newnumber As Double)
m_number = newnumber
End Property
Public Property Get addunits() As Double
addunits = m_units 'new swap units
End Property

Public Property Let addunits(ByVal newunits As Double)
m_units = newunits
End Property
Public Property Get addname() As String
addname = m_name 'new swap name
End Property

Public Property Let addname(ByVal newname As String)
m_name = newname
End Property
Public Property Get addticker() As String
addticker = m_ticker 'new swap ticker
End Property

Public Property Let addticker(ByVal newticker As String)
m_ticker = newticker
End Property
Public Property Get addnotional() As Double
addnotional = m_notional 'new notional amount
End Property

Public Property Let addnotional(ByVal newnotional As Double)
m_ticker = newnotional
End Property
Public Property Get addlibor() As Double
addlibor = m_libor 'new libor rate
End Property

Public Property Let addlibor(ByVal newlibor As Double)
m_libor = newlibor
End Property
Public Property Get addtd() As Date
addtd = m_td 'trade date
End Property

Public Property Let addtd(ByVal newtd As Date)
m_td = newtd
End Property
Public Property Get addexdate() As Date
addexdate = m_exdate 'expiration date
End Property

Public Property Let addexdate(ByVal newexdate As Date)
m_exdate = newexdate
End Property
Public Property Get addr1() As Date
addr1 = m_r1 'reset date1
End Property

Public Property Let addr1(ByVal newr1 As Date)
m_r1 = newr1
End Property
Public Property Get addr2() As Date
addr2 = m_r2 'reset date2
End Property

Public Property Let addr2(ByVal newr2 As Date)
m_r2 = newr2
End Property
Public Property Get addr3() As Date
addr3 = m_r3 'reset date3
End Property

Public Property Let addr3(ByVal newr3 As Date)
m_r3 = newr3
End Property
Public Property Get addr4() As Date
addr4 = m_r4 'reset date4
End Property

Public Property Let addr4(ByVal newr4 As Date)
m_r4 = newr4
End Property
Public Sub addswap()
swap.addnumber = Range("b2")
swap.addname = Range("b4")
swap.addtd = Range("b6")
swap.addexdate = Range("b8")
swap.addunits = Range("b10")
swap.addnotional = Range("b12")
swap.addlibor = Range("b14")
swap.addticker = Range("b16")
swap.addr1 = Range("b18")
swap.addr2 = Range("b20")
swap.addr3 = Range("b22")
swap.addr4 = Range("b24")
End Sub

Public Function getswap()
swap.addnumber = Range("b2")
swap.addname = Range("b4")
swap.addtd = Range("b6")
swap.addexdate = Range("b8")
swap.addunits = Range("b10")
swap.addnotional = Range("b12")
swap.addlibor = Range("b14")
swap.addticker = Range("b16")
swap.addr1 = Range("b18")
swap.addr2 = Range("b20")
swap.addr3 = Range("b22")
swap.addr4 = Range("b24")
End Function

i cant get this to work, it says user type not defined etc.
iam trying to create a class called swap
with notional, number. etc as variables. i would like to create
another 10 instances of this class
where am i messing up?

thanks
Jul 17 '05 #1
0 2284

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gernot Saborowski | last post by:
To all IIS/ASP-professionals, we just upgraded from one machine to another and are experiencing some strange date time number problems. Both systems have been set up like this: - MS Windows...
2
by: TeknoCat | last post by:
Hey everyone, I may be repeating myself here, but if someone sent a reply then I missed it, and I can't get Outlook Express to download any messages more than 2 days old. Anyway, I'm having a...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
1
by: A Hirsi | last post by:
I have created a vb .net program as a service that is using a simple ftpclient to connect to a remote server and check the status of a file for subsequent downloading if there have been changes to...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
3
by: promiscuoustx | last post by:
I am trying to get my program to compile, but it will not complete. At line 79 it states, cannot convert 'float()()' to 'float' in assignment. Here is my code. #include <iostream> #include...
22
by: Amali | last post by:
I'm newdie in c programming. this is my first project in programming. I have to write a program for a airline reservation. this is what i have done yet. but when it runs it shows the number of...
5
by: sandyw | last post by:
I need help in two areas: Both are at the bottom of my program where a client has two choice to make, 1. When the client enter "Y" it takes him to the begin of the program. I would like to know...
12
by: Zilla | last post by:
I put everything in one file for ease of use; also I have #include <*.hfiles instead of the <*since my compiler is pre-ANSI C so it needs the .h #include <iostream.h> #include <iomanip.h>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.