ãã¿ãã©ããã¯èªãã 人ã®å¤æã«ãä»»ãããã¨ãã¦ãä¹ ãã¶ãã«VBAã®ã³ã¼ãæ¸ãã¾ããã
ã¿ã¤ãã«ã«ããéããåããã©ã«ãã«ããExcelãã¡ã¤ã«ã®å ¨ã·ã¼ããA1ã»ã«ã«æããã£ã¦ãã¤ã§ãã
ã¤ãã§ã«ããæ¡å¤§çã100%ã«æãããå¦çã追å ãã¾ããã
ã³ã¼ã
é©å½ã«æ¨æºã¢ã¸ã¥ã¼ã«ã«ã§ãã³ãããã¦ä½¿ã£ã¦ä¸ããã
ã©ãã§ãè¯ããã¨ã§ãããç§ã¯VBAæ¸ãã¨ãã«ã¡ã½ããåã«æ¥æ¬èªä½¿ãã®ãçã«ãªã£ã¦ã¾ãã
Option Explicit Private Sub ã»ã«ãA1ã«ã»ãããã(sheet As Worksheet) sheet.Select sheet.Range("A1").Select ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1 End Sub Private Sub æ¡å¤§çã100ãã¼ã»ã³ãã«ãã(sheet As Worksheet) sheet.Select ActiveWindow.Zoom = 100 End Sub Private Sub å é ã®ã·ã¼ããé¸æããç¶æ ã«ãã(wb As Workbook) wb.Sheets(1).Select End Sub Private Sub å ¨ã¦ã®ã·ã¼ããæ´åãã(wb As Workbook) Dim sheet As Worksheet For Each sheet In wb.Sheets ã»ã«ãA1ã«ã»ãããã sheet æ¡å¤§çã100ãã¼ã»ã³ãã«ãã sheet Next å é ã®ã·ã¼ããé¸æããç¶æ ã«ãã wb End Sub Sub ãã©ã«ãé ä¸ã®å ¨xlsxãã¡ã¤ã«ãæ´åãã() Application.ScreenUpdating = False Dim wb As Workbook Dim file As String file = Dir(ThisWorkbook.Path & "\*.xlsx") Do Debug.Print file Set wb = Workbooks.Open(ThisWorkbook.Path & "\" & file) DoEvents å ¨ã¦ã®ã·ã¼ããæ´åãã wb wb.Save wb.Close Set wb = Nothing file = Dir Loop Until file = "" Application.ScreenUpdating = True End Sub
ã¾ã¨ã
ããã§ç´ååã®ä½æ¥ãæãã¾ãããçæéã§ç²¾åº¦ã®é«ãã¢ã¦ãããããå¾ããã¨ãã§ãã¾ããçç£æ§ã¯å¤§å¹ ã«ã¢ããããã°ãããã
ã§ãããããã£ã¦æ¬å½ã«å¿ è¦ãªãã¨ï¼
ããã¾ãã