ray88’s diary

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

2021-03-01から1ヶ月間の記事一覧

AccessVBA リストボックスをクリアする

Me.リストボックス.RowSource = ""

VBA 指定したパスのフォルダ内にあるファイルの総数を返す

■フォルダ内のファイル件数を確認する 呼び出し元プロシージャ Sub subFileCount() Dim strPath As String Dim intFilesCount As Integer strPath = "C:\Users\デスクトップ\テスト" intFilesCount = getFileCount(strPath) MsgBox intFilesCount End Sub フ…

VBA 指定したパス内のサブフォルダの総数を返す

■指定したパスのフォルダ内のサブフォルダをカウントし、総件数を返す 呼び出し元プロシージャ Sub subFolderCount() Dim strPath As String Dim intSubFoldersCount As Integer strPath = "C:\Users\デスクトップ\テスト" intSubFoldersCount = getSubFolde…

VBA 指定されたパスより親フォルダパスを取得する

呼び出し元プロシージャ Sub Try() Dim strPath As String Dim strFolderName As String strPath = "C:\Users\デスクトップ\テスト.xlsm" strFolderName = getParentFolderPath(strPath) MsgBox strFolderName End Sub ファンクションプロシージャ Function …

VBA 指定したパスからファイル名(拡張子なし)を取得する

呼び出し元プロシージャ Sub Try() Dim strPath As String Dim strBaseFileName As String strPath = "C:\Users\デスクトップ\テスト.xlsm" strBaseFileName = getBaseFileName(strPath) MsgBox strBaseFileName End Sub ファンクションプロシージャ Functio…

VBA 指定したパスからファイル名(拡張子あり)を取得する

呼び出し元プロシージャ Sub Try() Dim strPath As String Dim strFileName As String strPath = "C:\Users\デスクトップ\テスト.xlsm" strFileName = gefFileName(strPath) MsgBox strFileName End Sub ファンクションプロシージャ Function gefFileName(st…

VBA 指定したファイルパスより拡張子を取得する

■指定したファイルパスより拡張子を取得する 呼び出し元プロシージャ Sub テスト() Dim strPath As String Dim strExtension As String strPath = "C:\デスクトップ\テスト.xlsm" strExtension = getExtension(strPath) MsgBox strExtension End Sub ファン…

UiPath 吹き出しアクティビティ(処理件数表示など)

①吹き出しアクティビティを使用するには「UiPath.UiAutomationActivities」のパッケージをインストールする。 ②吹き出しアクティビティは普通のUiPathでは「吹き出し」で表示されてるけど、なぜかコミュニティエディションでは「ツールチップ」になっている…

UiPath KillProcess

①Killプロセスアクティビティを選択 ②ProcessNameに”iexplore"を設定 ※Edgeを強制終了する場合は"msedge" ※Excelを強制終了する場合は”EXCEL”