ray88’s diary

お仕事で困ったとき用の自分用の覚書

参照設定でチェックを入れる場所と変数宣言の仕方

■ADODBを事前バインディングする際は参照設定の
Microsoft ActiveX Data Objects 6.1 Library」にチェックを入れる

変数の宣言の仕方

 Dim CN As ADODB.Connection
 Dim RS As ADODB.Recordset

 Set CN = New ADODB.Connection
  Set RS = New ADODB.Recordset

■FileSystemObjectを事前バインディングする際は参照設定の
Microsoft Scripting Runtime」にチェックを入れる

変数宣言の仕方

   Dim FSO As FileSystemObject
   Set FSO = New FileSystemObject
    
    'または
    Dim FSO As New FileSystemObject