|
看到有网友提出此要求,就做了一例子.代码是比较容易读懂的.
Option Explicit
Dim myNameSet() As Byte
Dim MyNameGet() As Byte
Const AppName = "StanleyPan提示"
'*************************************************************************
'**╭⌒╮⌒╮ ︸ ︷ ﹀ ︿
'**╱◥██◣ Home ﹀ ︷ ︸
'**|田|田 田|﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏
'**╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
'**Mail:Stanley.pan2000@Hotmail.com
'*************************************************************************
'**模 块 名:
'**说 明: 版权所有2003 - 2004(C)
'**创 建 人:StanleyPan
'**创建日期:2008-11-14 16:52:14
'**修 改 人:
'**修改日期:
'**模块描述:
'**版 本:版本1.0
'*************************************************************************
Sub setting()
Dim InputMsg, Msg As String
Msg = "请您输入测试内容!! ^_^"
InputMsg = InputBox(Msg, AppName, "Just for testing--Stanley Pan")
If InputMsg <> "" Then
myNameSet = StrConv(InputMsg, vbFromUnicode)
ReDim Preserve myNameSet(100) '100基本够测试了.
Open Application.ThisWorkbook.FullName For Binary As 1#
Put 1#, LOF(1), myNameSet
Close
End If
End Sub
Sub Getting()
ReDim MyNameGet(100)
Open Application.ThisWorkbook.FullName For Binary As 1#
Get 1#, LOF(1) - 100, MyNameGet
Close
MsgBox StrConv(MyNameGet, vbUnicode), vbInformation, AppName
End Sub |
|