| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 837 人关注过本帖
标题:请问:Public Function Add() As CCustomer,这函数后面接As CCustomer类有什 ...
只看楼主 加入收藏
wujingyi
Rank: 2
等 级:论坛游民
帖 子:73
专家分:55
注 册:2006-4-20
收藏
 问题点数:0 回复次数:1 
请问: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
随风逐流
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:passerby
等 级:版主
威 望:8
帖 子:4054
专家分:271
注 册:2007-6-13
收藏
得分:0 
Public Function Add() As CCustomer
这是一个公用的函数ADD 后面As CCustomer是要返回CCustomer类型的值

[url=http://www./html/6/6694/]极道金丹[/url][url=http://www./html/2/2849/]九阴九阳[/url][url=http://www./html/2/2596/]凡人修仙传[/url]
2007-07-16 22:03
快速回复:请问:Public Function Add() As CCustomer,这函数后面接As CCustomer类 ...
数据加载中...
 
   



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

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