ããè¡ã®é«ããåå¹ ããä»ã®è¡ã¾ãã¯åã«é©ç¨ãã
ã¨ã¯ã»ã«ã使ç¨ãã¦ããã¨ãè¡ã®é«ããåã®å¹
ãã³ãã¼ãã¦ä»ã®è¡ã»åã«é©ç¨ãããã¨ããããã¾ãã
ãããªã¨ãã¯ã©ãããã°ããã§ããããï¼
 ç®æ¬¡
- å½¢å¼ãé¸æãã¦è²¼ãä»ãããæ¹æ³
- é«ããå¹ ã確èªãã¦ãããä»ã®è¡ã»åã«è¨å®ããæ¹æ³
- ãã¯ãã§é©ç¨ããæ¹æ³
Â
å½¢å¼ãé¸æãã¦è²¼ãä»ãããæ¹æ³
æ°å¼ãæ¸å¼ã®ã¿ãã³ãã¼ãã¦è²¼ãä»ãã§ããã®ã¨åãããã«ãåå¹ ã®ã¿ãã³ãã¼ãã¦è²¼ãä»ãããã¨ãã§ãã¾ãã
Â
・・・・・・ããï¼è¡é«ãã¯ï¼
ãªãããå½¢å¼ãé¸æãã¦è²¼ãä»ãããæ¹æ³ã«ã¯è¡é«ãã®ã¿ãã³ããããæ©è½ãããã¾ããã
Â
é«ããå¹ ã確èªãã¦ãããä»ã®è¡ã»åã«è¨å®ããæ¹æ³
ãããä¸çªåå§çãªæ¹æ³ã§ãããææ¬ã«ãããè¡ãåã®å¢ç®ãããï¼ã«ã¼ã½ã«ã®å½¢ãå¤ããæï¼ã§ã¯ãªãã¯ãã¦ãå¤ã確èªã
Â
次ã«ãå¤ãåãã«ãããè¡ã¾ãã¯åãé¸æããç¶æ ã§å³ã¯ãªãã¯âãè¡ã®é«ãï¼ã¾ãã¯åã®å¹ ï¼ãã§åãå¤ãå ¥åãã¦OKãã¾ãã
Â
ãã ããå¤ã確èªããå ¥åããæéãããã¾ãã
Â
ãã¯ãã§é©ç¨ããæ¹æ³
ä¸ã®æ¹æ³ã§ãååãªã®ã§ãããã¡ãã£ã¨ã ãï¼ã»ãã®ã¡ãã£ã¨ã ãï¼ç°¡åã«ã§ãããã¯ããä½ã£ã¦ã¿ã¾ããã
Sub è¡ã®é«ããåå¹ ãä»ã®è¡ã¾ãã¯åã«é©ç¨ãã() 'é©ç¨å ã®è¡å ¨ä½ã¾ãã¯åå ¨ä½ãé¸æããç¶æ ã§å®è¡ãã 'ã¤ã³ãããããã¯ã¹ã§é©ç¨å ã®è¡ã¾ãã¯åãæå®ãã Dim åçªå· As String Dim åå¹ As Double Dim è¡çªå· As Long Dim è¡é«ã As Double If Selection.Address = Selection.EntireColumn.Address Then åçªå· = InputBox("åå¹ ã®é©ç¨å ã¨ãªãåçªå·ãã¢ã«ãã¡ãããã§æå®") åçªå· = StrConv(åçªå·, vbNarrow) If åçªå· Like "*[!A-Za-z]*" Then GoTo ã¨ã©ã¼å¦ç On Error GoTo ã¨ã©ã¼å¦ç åå¹ = Columns(åçªå·).ColumnWidth On Error GoTo 0 Selection.ColumnWidth = åå¹ ElseIf Selection.Address = Selection.EntireRow.Address Then è¡çªå· = InputBox("è¡é«ãã®é©ç¨å ã¨ãªãè¡çªå·ãæå®") On Error GoTo ã¨ã©ã¼å¦ç è¡é«ã = Rows(è¡çªå·).RowHeight On Error GoTo 0 Selection.RowHeight = è¡é«ã End If Exit Sub ã¨ã©ã¼å¦ç: MsgBox "åå¨ããªãè¡ã¾ãã¯åã§ãã" End Sub
â»ã³ã¼ãã®ä½¿ç¨æ¹æ³
SubããEnd Subã¾ã§ãã³ãã¼ããæ¨æºã¢ã¸ã¥ã¼ã«çã«è²¼ãä»ãã¦ä½¿ç¨ãã¦ä¸ããããªãããã¯ãã§å®è¡ããå¦çã¯ãå ã«æ»ãããã¨ãã§ãã¾ãããå®è¡åã«ä¸æ¦ä¿åãããç´ãã®ã§ããç¶æ ã«ãã¦ããã¦ä¸ãããæ¨æºã¢ã¸ã¥ã¼ã«ã«ã³ã¼ããè²¼ãä»ãã¦ãã¯ãã使ç¨ããæ¹æ³ã¯ãã¡ãã
Â
å®è¡æé
- é«ããå¹ ãå¤æ´ãããè¡ã¾ãã¯åãé¸æããç¶æ ã§ãã¯ããå®è¡ã
- InputBoxã表示ãããã®ã§ããææ¬ã«ãããè¡ã¾ãã¯åãå ¥åãã¦OKãããâ»è¡ã¯æ°åãåã¯ã¢ã«ãã¡ãããã§å ¥åããã
Â
・・・・・・ããã¾ã§æ¸ãã¦ã¢ã¬ã§ããããã¯ããç¨æããã»ã©ã§ããªãã£ãããã