锘??xml version="1.0" encoding="utf-8" standalone="yes"?>学生妹亚洲一区二区,亚洲高清专区日韩精品,亚洲精品国产日韩无码AV永久免费网 http://www.tkk7.com/Jcat/category/30224.html瀹犺頸涓嶆儕錛岄棽鐪嬪涵鍓嶈姳寮鑺辮惤锝烇綖zh-cnSat, 29 Aug 2009 21:29:26 GMTSat, 29 Aug 2009 21:29:26 GMT60灝忓伐鍏?/title><link>http://www.tkk7.com/Jcat/archive/2009/05/20/271788.html</link><dc:creator>Jcat</dc:creator><author>Jcat</author><pubDate>Wed, 20 May 2009 12:20:00 GMT</pubDate><guid>http://www.tkk7.com/Jcat/archive/2009/05/20/271788.html</guid><wfw:comment>http://www.tkk7.com/Jcat/comments/271788.html</wfw:comment><comments>http://www.tkk7.com/Jcat/archive/2009/05/20/271788.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Jcat/comments/commentRss/271788.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Jcat/services/trackbacks/271788.html</trackback:ping><description><![CDATA[ <font color="#006400">榪愯璇ub錛屾墍鏈夊崟鍏冩牸鐨勫瓧姣嶉兘浼氬彉鎴愬ぇ鍐欑殑</font> <br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 0, 255);">Sub</span> <span style="color: rgb(0, 0, 0);">聽cap()<br /></span> <span style="color: rgb(0, 0, 255);">Dim</span> <span style="color: rgb(0, 0, 0);">聽cell聽</span> <span style="color: rgb(0, 0, 255);">As</span> <span style="color: rgb(0, 0, 0);">聽Range<br /></span> <span style="color: rgb(0, 0, 255);">For</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 255);">Each</span> <span style="color: rgb(0, 0, 0);">聽cell聽In聽UsedRange<br />聽聽聽聽cell.Value聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 255);">UCase</span> <span style="color: rgb(0, 0, 0);"> <font color="#0000ff">$</font>(cell.Value)<br /></span> <span style="color: rgb(0, 0, 255);">Next</span> <span style="color: rgb(0, 0, 0);"> <br /> </span> <span style="color: rgb(0, 0, 255);">End聽Sub</span> </div> <br /> <font color="#006400">緇欏畾涓孌墊椂闂達紝璁$畻鍑轟粈涔堟椂鍊欏埌鏈?/font> <br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 0, 255);">Sub</span> <span style="color: rgb(0, 0, 0);">聽deadline()<br />聽聽聽聽</span> <span style="color: rgb(0, 0, 255);">Dim</span> <span style="color: rgb(0, 0, 0);">聽deadtime聽</span> <span style="color: rgb(0, 0, 255);">As</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 255);">Date</span> <span style="color: rgb(0, 0, 0);"> <br />聽聽聽聽deadtime聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 255);">DateAdd</span> <span style="color: rgb(0, 0, 0);">(</span> <span style="color: rgb(0, 0, 0);">"</span> <span style="color: rgb(0, 0, 0);">d</span> <span style="color: rgb(0, 0, 0);">"</span> <span style="color: rgb(0, 0, 0);">,聽Cells(</span> <span style="color: rgb(0, 0, 0);">2</span> <span style="color: rgb(0, 0, 0);">,聽</span> <span style="color: rgb(0, 0, 0);">2</span> <span style="color: rgb(0, 0, 0);">),聽</span> <span style="color: rgb(0, 0, 255);">Now</span> <span style="color: rgb(0, 0, 0);">)聽聽聽聽聽聽聽</span> <span style="color: rgb(0, 128, 0);">'</span> <span style="color: rgb(0, 128, 0);">day</span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 0);">聽聽聽聽deadtime聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 255);">DateAdd</span> <span style="color: rgb(0, 0, 0);">(</span> <span style="color: rgb(0, 0, 0);">"</span> <span style="color: rgb(0, 0, 0);">h</span> <span style="color: rgb(0, 0, 0);">"</span> <span style="color: rgb(0, 0, 0);">,聽Cells(</span> <span style="color: rgb(0, 0, 0);">2</span> <span style="color: rgb(0, 0, 0);">,聽</span> <span style="color: rgb(0, 0, 0);">3</span> <span style="color: rgb(0, 0, 0);">),聽deadtime)聽聽</span> <span style="color: rgb(0, 128, 0);">'</span> <span style="color: rgb(0, 128, 0);">hour</span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 0);">聽聽聽聽deadtime聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 255);">DateAdd</span> <span style="color: rgb(0, 0, 0);">(</span> <span style="color: rgb(0, 0, 0);">"</span> <span style="color: rgb(0, 0, 0);">n</span> <span style="color: rgb(0, 0, 0);">"</span> <span style="color: rgb(0, 0, 0);">,聽Cells(</span> <span style="color: rgb(0, 0, 0);">2</span> <span style="color: rgb(0, 0, 0);">,聽</span> <span style="color: rgb(0, 0, 0);">4</span> <span style="color: rgb(0, 0, 0);">),聽deadtime)聽聽</span> <span style="color: rgb(0, 128, 0);">'</span> <span style="color: rgb(0, 128, 0);">minute</span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 0);">聽聽聽聽ActiveCell.Value聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽deadtime<br /></span> <span style="color: rgb(0, 0, 255);">End聽Sub</span> <span style="color: rgb(0, 0, 0);"> <br /> </span> </div> <br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"> <!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--> <span style="color: rgb(0, 128, 0);">'</span> <span style="color: rgb(0, 128, 0);">閫変腑鍙崇Щ</span> <span style="color: rgb(0, 128, 0);"> <br /> </span> <span style="color: rgb(0, 0, 0);">ActiveCell.Value聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">123</span> <span style="color: rgb(0, 0, 0);"> <br />Cells(ActiveCell.Row,聽ActiveCell.Column聽</span> <span style="color: rgb(0, 0, 0);">+</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">1</span> <span style="color: rgb(0, 0, 0);">).Select<br />ActiveCell.Value聽</span> <span style="color: rgb(0, 0, 0);">=</span> <span style="color: rgb(0, 0, 0);">聽</span> <span style="color: rgb(0, 0, 0);">456</span> </div> <br /> <img src ="http://www.tkk7.com/Jcat/aggbug/271788.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Jcat/" target="_blank">Jcat</a> 2009-05-20 20:20 <a href="http://www.tkk7.com/Jcat/archive/2009/05/20/271788.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Array in VBAhttp://www.tkk7.com/Jcat/archive/2008/03/28/189328.htmlJcatJcatFri, 28 Mar 2008 10:11:00 GMThttp://www.tkk7.com/Jcat/archive/2008/03/28/189328.htmlhttp://www.tkk7.com/Jcat/comments/189328.htmlhttp://www.tkk7.com/Jcat/archive/2008/03/28/189328.html#Feedback0http://www.tkk7.com/Jcat/comments/commentRss/189328.htmlhttp://www.tkk7.com/Jcat/services/trackbacks/189328.htmlDeclaring and Initialization
Option Explicit

Sub 聽arrayInVBA()
聽聽聽聽
Dim 聽a1( 5 )聽 As String
聽聽聽聽 Debug.Assert聽
LBound (a1)聽 = 0
聽聽聽聽 Debug.Assert聽
UBound (a1)聽 = 5
聽聽聽聽 Debug.Assert聽
TypeName (a1)聽 = " String() "

聽聽聽聽
Dim 聽a2( 2 To 5 )聽 As Integer
聽聽聽聽 Debug.Assert聽
LBound (a2)聽 = 2
聽聽聽聽 Debug.Assert聽
UBound (a2)聽 = 5
聽聽聽聽 Debug.Assert聽
TypeName (a2)聽 = " Integer() "

聽聽聽聽
Dim 聽arrayFunction:聽arrayFunction聽 = 聽Array( " aa " ,聽 " bb " ,聽 " cc " ,聽 " dd " ,聽 " ee " ,聽 " ff " )
聽聽聽聽 Debug.Assert聽
LBound (arrayFunction)聽 = 0
聽聽聽聽 Debug.Assert聽
UBound (arrayFunction)聽 = 5
聽聽聽聽 Debug.Assert聽
TypeName (arrayFunction)聽 = " Variant() "

聽聽聽聽
' initialize聽by聽Array()聽function
聽聽聽聽 Dim 聽i聽 As Integer
聽聽聽聽
For 聽i聽 = 0 To 5
聽聽聽聽聽聽聽聽a1(i)聽
= 聽arrayFunction(i)
聽聽聽聽
Next 聽i
聽聽聽聽
聽聽聽聽
For 聽i聽 = 0 To 5
聽聽聽聽聽聽聽Debug.Print聽a1(i)
聽聽聽聽
Next 聽i
End聽Sub


Jcat 2008-03-28 18:11 鍙戣〃璇勮
]]>
Optional argument for Functionhttp://www.tkk7.com/Jcat/archive/2008/03/28/189294.htmlJcatJcatFri, 28 Mar 2008 08:23:00 GMThttp://www.tkk7.com/Jcat/archive/2008/03/28/189294.htmlhttp://www.tkk7.com/Jcat/comments/189294.htmlhttp://www.tkk7.com/Jcat/archive/2008/03/28/189294.html#Feedback0http://www.tkk7.com/Jcat/comments/commentRss/189294.htmlhttp://www.tkk7.com/Jcat/services/trackbacks/189294.htmlMUST declare the optional argument as a Variant data type. Then you can use the IsMissing function within the procedure.

OptionExplicit

Function聽explicitType(Optional聽s聽AsInteger)
聽聽聽 Debug.Assert聽IsNull(s)聽
=False
聽聽聽 Debug.Assert聽IsMissing(s)聽
=False
聽聽聽 Debug.Assert聽s聽
=0
聽聽聽 explicitType聽
=聽s
End聽Function


Function聽variantType(Optional聽s)
聽聽聽 Debug.Assert聽IsNull(s)聽
=False
聽聽聽 Debug.Assert聽IsMissing(s)聽
=True
聽聽聽 'Debug.Print聽s聽聽'Error聽448
聽聽聽 variantType聽=聽s
End聽Function


Sub聽test()
聽聽聽 Debug.Print聽explicitType()
聽聽聽 Debug.Print聽variantType()
End聽Sub



Jcat 2008-03-28 16:23 鍙戣〃璇勮
]]>
鍩虹samplehttp://www.tkk7.com/Jcat/archive/2008/03/26/188782.htmlJcatJcatWed, 26 Mar 2008 08:26:00 GMThttp://www.tkk7.com/Jcat/archive/2008/03/26/188782.htmlhttp://www.tkk7.com/Jcat/comments/188782.htmlhttp://www.tkk7.com/Jcat/archive/2008/03/26/188782.html#Feedback0http://www.tkk7.com/Jcat/comments/commentRss/188782.htmlhttp://www.tkk7.com/Jcat/services/trackbacks/188782.htmlControlling Function Recalculation
' the聽same聽as聽Round聽excel-function
Function 聽nonStaticRand()
聽聽聽 Application.Volatile聽
True
聽聽聽 nonStaticRand聽
= Rnd ()聽聽聽 ' Rnd聽is聽a聽vba-function
End聽Function

' Calculate聽only聽once,聽so聽rand聽number聽won't聽be聽changed聽afterwards
Function 聽staticRand()
聽聽聽 Application.Volatile聽
False 聽聽 ' you聽can聽ignore聽this聽line,聽default聽is聽False
聽聽聽 staticRand聽 = Rnd ()
End聽Function



Jcat 2008-03-26 16:26 鍙戣〃璇勮
]]>
Logic & Loophttp://www.tkk7.com/Jcat/archive/2008/03/25/188551.htmlJcatJcatTue, 25 Mar 2008 10:05:00 GMThttp://www.tkk7.com/Jcat/archive/2008/03/25/188551.htmlhttp://www.tkk7.com/Jcat/comments/188551.htmlhttp://www.tkk7.com/Jcat/archive/2008/03/25/188551.html#Feedback0http://www.tkk7.com/Jcat/comments/commentRss/188551.htmlhttp://www.tkk7.com/Jcat/services/trackbacks/188551.html 聽聽聽聽 ' 'Logical聽Structures
聽聽聽聽 Dim 聽flag聽 As Integer
聽聽聽聽
' 1)
聽聽聽聽 If True Then 聽flag聽 = 1 Else 聽flag聽 = 0
聽聽聽聽Debug.Assert聽flag聽
= 1
聽聽聽聽
' 2)
聽聽聽聽 If False Then
聽聽聽聽聽聽聽聽flag聽
= 1
聽聽聽聽
Else
聽聽聽聽聽聽聽聽flag聽
= 0
聽聽聽聽
End If
聽聽聽聽Debug.Assert聽flag聽
= 0
聽聽聽聽
' 3)
聽聽聽聽flag聽 = IIf ( True ,聽 1 ,聽 0 )
聽聽聽聽Debug.Assert聽flag聽
= 1
聽聽聽聽
聽聽聽聽
' 'Logical聽Operators
聽聽聽聽Debug.Assert聽( 1 = 1 )聽 = True
聽聽聽聽Debug.Assert聽
Not 聽( 1 = 1 )聽 = False
聽聽聽聽Debug.Assert聽(
True And False )聽 = False
聽聽聽聽Debug.Assert聽(
True Or False )聽 = True


' 'Loop聽Structure
For 聽i聽 = 1 To 5
聽聽聽聽
聽聽聽聽
If Then
聽聽聽聽聽聽聽聽
Exit For ' 鐩稿綋浜嶣reak
聽聽聽聽 End If
Next 聽i



Jcat 2008-03-25 18:05 鍙戣〃璇勮
]]>
璇硶鍩虹http://www.tkk7.com/Jcat/archive/2008/03/20/187437.htmlJcatJcatThu, 20 Mar 2008 03:16:00 GMThttp://www.tkk7.com/Jcat/archive/2008/03/20/187437.htmlhttp://www.tkk7.com/Jcat/comments/187437.htmlhttp://www.tkk7.com/Jcat/archive/2008/03/20/187437.html#Feedback0http://www.tkk7.com/Jcat/comments/commentRss/187437.htmlhttp://www.tkk7.com/Jcat/services/trackbacks/187437.html Options
Option Explicit
You must explicitly define each variable that you use.

Option Private Module
You can force all procedures in a module to be private - even those declared with the Public keyword.
You can omit the Private keyword from your Sub declarations.

Option Base [01]
The lower bound of an array, created using the Array function, is determined by Option Base statement at the top of the module. The default lower bound is 0


Declaring Variables
Dim 聽鍙橀噺聽 As String
鍙橀噺聽
= " initialization "

Const 聽甯擱噺聽 As String = " initialization "

Dim 聽瀹氶暱瀛楃涓猜?/span> As String * 10
瀹氶暱瀛楃涓猜?/span> = " 瓚呰繃ten涓棤鏁堬紙涓枃鑻辨枃閮界畻1涓紝鐪嬫潵緙栫爜鐢ㄧ殑unicode錛?/span> "



Executing Sub from another Procedure
Option Explicit


Sub 聽executingWay()
聽聽聽 add聽
" flame " ,聽 1 ,聽 2

聽聽聽 Call 聽add( " call " ,聽 1 ,聽 2 )

聽聽聽 Dim 聽subName聽 As String :聽subName聽 = " add "
聽聽聽 Run聽subName,聽
" run " ,聽 1 ,聽 2
End聽Sub


Sub 聽add(exeBy聽 As String ,聽x聽 As Integer ,聽y聽 As Integer )
聽聽聽 MsgBox 聽exeBy聽 & " :聽 " & 聽(x聽 + 聽y)
End聽Sub


Executing Function from another Procedure
Option Explicit

Function 聽executingWay()
聽聽聽 Debug.Print聽add(
" flame " ,聽 1 ,聽 2 )

聽聽聽 Dim 聽funcName聽聽聽 As String :聽funcName聽 = " add "
聽聽聽 Debug.Print聽Run(funcName,聽
" run " ,聽 1 ,聽 2 )
End聽Function


Function 聽add(exeBy聽 As String ,聽x聽 As Integer ,聽y聽 As Integer )聽 As String
聽聽聽 add聽
= 聽exeBy聽 & " :聽 " & 聽(x聽 + 聽y)
End聽Function



Jcat 2008-03-20 11:16 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲av无码专区国产乱码在线观看| 免费看a级黄色片| 亚洲精品国产精品乱码视色| 免费人人潮人人爽一区二区| 可以免费观看的一级毛片| 国产精品成人亚洲| 亚洲成人高清在线| 久久久久久噜噜精品免费直播| 久久亚洲国产精品123区| 色www永久免费| 亚洲自偷精品视频自拍| 99视频免费播放| 亚洲欧洲日本国产| aⅴ免费在线观看| 亚洲中文字幕久久久一区| 成人免费视频软件网站| 国产亚洲精品成人久久网站| 亚洲女人被黑人巨大进入| 9久久免费国产精品特黄| 亚洲人成电影在线天堂| 91频在线观看免费大全| 蜜桃传媒一区二区亚洲AV| 亚洲国产精品人人做人人爽| 国产在线观看免费av站| 亚洲综合区图片小说区| 在线a毛片免费视频观看| 一级毛片免费播放男男| 亚洲一区二区成人| 大学生一级毛片免费看| 国产成人高清亚洲一区91| 久久亚洲国产欧洲精品一| 91精品国产免费网站| 亚洲va中文字幕| 亚洲自偷自偷图片| 亚洲精品视频在线免费| 亚洲人成网站色7799| 在线观看国产区亚洲一区成人 | 亚洲毛片免费观看| 免费涩涩在线视频网| a级毛片毛片免费观看永久| 亚洲国产电影在线观看|