.定数宣言のConstと型宣言文字 Constの基本 Const定数名 [As データ型] = "定数の値" 変数の違いは、VBA実行の途中で値を変更できない事です。 Conststrタイトル As String = "見出し" Const int開始行 = 3 "見出"という文字の代わりに、strタイトルを、 3とい数値の代わりに、int...
Const adTypeBinary = 1 Set ADO = CreateObject("ADODB.Stream") ADO.Type = adTypeBinary ADO.Open 'バイトデータの並びを文字列型変数に読み取ります。 '読み取ったデータは、配列としてはアクセスできません。 '代わりにMidB を使って取得、代入ができます。 ADO.LoadFromFile TestFilePath Byte...
DimCurrentColorAsIntegerConstBLACK =0, RED =1, GREEN =2, BLUE =3' Returns the current color of the pen as a string.PropertyGetPenColor()AsStringSelectCaseCurrentColorCaseRED PenColor ="Red"CaseGREEN PenColor ="Green"CaseBLUE PenColor ="Blue"EndSelectEndProperty' The following code gets the...
宣言セクションにいくつかモジュールレベル変数を定義します。 '↓自分のGmailアドレスConstUSER_IDAsString="piyohoge@fugafuga.com"'↓OAuthクライアントIDを作成したら入力ConstCLIENT_IDAsString="~.apps.googleusercontent.com"ConstCLIENT_SECRETAsString="~"ConstAUTH_URIAsString="https://accounts...
const double cstEPS = 0.0000000001; long i, j, k, n, intMax; double dbPivot, dbWKR, dbDet; n = intN; dbDet = 1; //初期化 for(i=0;i<intN;i++) adbInv[i + n * i] = 1; //逆行列 for(i=0;i<intN;i++) {
'VBAの場合は、Function ... As Boolean で宣言しておけば、この1行は不要です。CanBeSJIS=False'ファイルをバイナリデータとして読み取るために ADODB.Streamを用います。ConstadTypeBinary=1SetAdo=CreateObject("ADODB.Stream")Ado.Type=adTypeBinaryAdo.Open'バイトデータの並びを文字列型変数に読み...
DimCurrentColorAsIntegerConstBLACK =0, RED =1, GREEN =2, BLUE =3' Set the pen color property for a Drawing package.' The module-level variable CurrentColor is set to' a numeric value that identifies the color used for drawing.PropertyLetPenColor(ColorNameAsString)SelectCaseColorName' Check ...