6UNote6

備忘録

2023-01-01から1年間の記事一覧

【Excel】クリップボード

'クリップボード取得Private Sub Worksheet_SelectionChange(ByVal Target As Range) Call SetClipBoard(ActiveSheet.Cells(ActiveCell.Row, ActiveCell.Column)) End Sub Option Explicit'クリップボードPrivate Declare Function OpenClipboard Lib "user3…

【Excel】外部ファイルから外部ファイルにシートをコピー

Const setSh As String = "メイン" Dim dayStart As DateDim dayEnd As Date'sheetDim reSh As WorksheetDim wrSh As WorksheetDim rb As WorkbookDim wb As Workbook 'CellsDim wrRow As LongDim wrCol As IntegerDim reRow As LongDim reCol As IntegerDim…

【Excel】外部ファイル データ転記

Dim CN As ADODB.Connection Dim day_start As DateDim day_end As Date'sheetDim reSh As WorksheetDim wrSh As WorksheetDim rb As WorkbookDim wb As Workbook 'CellsDim wrRow As LongDim wrCol As IntegerDim reRow As LongDim reCol As Integer 'パラ…

【Excel】データクエリー

’データクエリー Sub CreationEvaluationMain() Dim bkName As String bkName = "評価表.xlsm" '更新する Workbooks(bkName).Worksheets("pivot").PivotTables("pivot1").PivotCache.Refresh 'データクエリー Call RequestQuery(bkName) '更新する Workbooks…

【Excel】外部関数呼び出し

'外部関数呼び出しSub DoModuleCreationEvaluation() Dim fileName As String fileName = "外部関数.xlsm" 'ブックオープン Workbooks.Open fileName:=ThisWorkbook.Path & "\" & fileName, ReadOnly:=True ActiveWindow.WindowState = xlMinimized '関数実…

【Excel】ファイ名抽出 サブフォルダ

'Sheet Dim reSh As Worksheet Dim wrSh As Worksheet Dim rb As Workbook 'Cells Dim wrRow As Long Dim wrCol As Integer Dim reRow As Long Dim reCol As Integer 'File変数 Dim folderPath As String Dim filePath As String Dim fileName As String Dim…

【Excel】ファイル名変更 拡張子

ファイル名変更ファイル名は同じで拡張子のみ変更 'SheetDim reSh As WorksheetDim wrSh As WorksheetDim rb As Workbook'CellsDim wrRow As LongDim wrCol As IntegerDim reRow As LongDim reCol As Integer'File変数Dim folderPath As StringDim filePath …

【Excel】ファイ名変更 変換前後が固定

ファイル名変更固定 'SheetDim reSh As WorksheetDim wrSh As WorksheetDim rb As Workbook'CellsDim wrRow As LongDim wrCol As IntegerDim reRow As LongDim reCol As Integer'File変数Dim folderPath As StringDim filePath As StringDim fileName As Str…