标题:请问:Public Function Add() As CCustomer,这函数后面接As CCustomer类有什 ...
取消只看楼主
wujingyi
Rank: 2
等 级:论坛游民
帖 子:73
专家分:55
注 册:2006-4-20
 问题点数:0 回复次数:0 
请问:Public Function Add() As CCustomer,这函数后面接As CCustomer类有什么作用呢

Option Explicit
Dim objCurrentCustomer As CCustomer

Public Function Add() As CCustomer
Set objCurrentCustomer = New CCustomer
Me.Show vbModal
Set Add = objCurrentCustomer
Unload Me

End Function

Public Function Edit(objCustomer As CCustomer)
Set objCurrentCustomer = objCustomer

txtLastName = objCurrentCustomer.LastName
txtFirstName = objCurrentCustomer.FirstName
txtMidInitial = objCurrentCustomer.MidInitial
txtCompany = objCurrentCustomer.Company
txtAddress = objCurrentCustomer.Address
txtCity = objCurrentCustomer.City
txtState = objCurrentCustomer.State
txtPostalCode = objCurrentCustomer.PostalCode
txtCountry = objCurrentCustomer.Country
txtPhoneNumber = objCurrentCustomer.PhoneNumber
txtFaxNumber = objCurrentCustomer.FaxNumber
txtEMail = objCurrentCustomer.EMail

Me.Show vbModal

Unload Me
End Function
请问:Public Function Add() As CCustomer,这函数后面接As CCustomer类有什么作用呢,不明白为什么要接As CCustomer?

搜索更多相关主题的帖子: CCustomer Public Function Add 函数 
2007-07-16 21:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-155883-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.698191 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved