<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>罫線 | nujonoa_blog</title>
	<atom:link href="https://nujonoa.com/tag/%e7%bd%ab%e7%b7%9a/feed/" rel="self" type="application/rss+xml" />
	<link>https://nujonoa.com</link>
	<description>人生に役立つデータ集</description>
	<lastBuildDate>Fri, 14 Jun 2019 06:49:03 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://nujonoa.com/wp-content/uploads/2019/04/cropped-DSC00976-e1554456145409-32x32.jpg</url>
	<title>罫線 | nujonoa_blog</title>
	<link>https://nujonoa.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>選択範囲の罫線(太線)とセルの色を設定するマクロ～データ集計業務に即したマクロVBA</title>
		<link>https://nujonoa.com/vba-bor-mid/</link>
					<comments>https://nujonoa.com/vba-bor-mid/#respond</comments>
		
		<dc:creator><![CDATA[nujonoa]]></dc:creator>
		<pubDate>Thu, 11 Apr 2019 15:22:51 +0000</pubDate>
				<category><![CDATA[マクロVBA]]></category>
		<category><![CDATA[マクロ]]></category>
		<category><![CDATA[vba]]></category>
		<category><![CDATA[罫線]]></category>
		<guid isPermaLink="false">http://nujonoa.com/?p=255</guid>

					<description><![CDATA[罫線を引きたいけど、xlEdgeTopなどなどのコードは忘れてしまいがちなので、覚えやすい名前に変更。 また、同時に色も付けられる設定にしています。 選択範囲の罫線とセルの色の設定 Public Sub BOR_THIN [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>罫線を引きたいけど、xlEdgeTopなどなどのコードは忘れてしまいがちなので、覚えやすい名前に変更。<br> また、同時に色も付けられる設定にしています。</p>



<h2 class="wp-block-heading">選択範囲の罫線とセルの色の設定</h2>



<p>Public Sub BOR_THIN(<span class="bold-red">FROM_Y, FROM_X, TO_Y, TO_X,</span> <span class="bold-blue">Optional BS = 0</span>, <span class="bold-green">Optional CLR = 0</span>)</p>



<p>・<span class="bold-red">(FROM_Y, FROM_X, TO_Y, TO_X）</span>で範囲の指定をしてください。  <br>　RANGE(CELLS(1,1),CELLS(2,2))→(1,1,2,2)です。</p>



<p>・<strong><span class="bold-blue">Optional BS = 0</span></strong> ,で罫線の種類を選択できます。<br>　"UE","SHITA","MIGI","HIDARI","ALL","JOUGE"何もなしだと外側を囲います。</p>



<p>・<span class="bold-green">Optional CLR = 0</span>　,で色を選択してください。<br>”RED”, ”YELLOW”, "BLUE”,”GREEN”,”HADA”,”MOMO”,から選べます。何もなしだと塗りつぶしなしです。</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: vb; title: ; notranslate">
'実行
Sub test()
Call BOR_MID(5, 10, 10, 15, &quot;UE&quot;, &quot;GREEN&quot;)
end Sub

'パブリックプロシージャ
Public Sub BOR_MID(FROM_Y, FROM_X, TO_Y, TO_X, Optional BS = 0, Optional CLR = 0)

    Range(Cells(FROM_Y, FROM_X), Cells(TO_Y, TO_X)).Select
    

    
    If BS = &quot;ALL&quot; Then
    
        Selection.Borders.Weight = xlMedium
    
    ElseIf BS = &quot;UE&quot; Then
    
        Selection.Borders(xlEdgeTop).Weight = xlMedium
    
    ElseIf BS = &quot;SITA&quot; Then
    
        Selection.Borders(xlEdgeBottom).Weight = xlMedium
    
    ElseIf BS = &quot;HIDARI&quot; Then
    
        Selection.Borders(xlEdgeLeft).Weight = xlMedium
        
    ElseIf BS = &quot;JOUGE&quot; Then

        Selection.Borders(xlEdgeRight).Weight = xlMedium

    ElseIf BS = &quot;MIGI&quot; Then

        Selection.Borders(xlEdgeRight).Weight = xlMedium
            
    Else
    
        Selection.BorderAround Weight:=xlMedium
    
    End If

    
    If CLR = &quot;RED&quot; Then
    
        Selection.Interior.ColorIndex = 3
    
    ElseIf CLR = &quot;YELLOW&quot; Then
    
        Selection.Interior.ColorIndex = 6

    ElseIf CLR = &quot;BLUE&quot; Then
    
        Selection.Interior.ColorIndex = 34
    
    ElseIf CLR = &quot;GREEN&quot; Then
    
        Selection.Interior.ColorIndex = 35

    ElseIf CLR = &quot;HADA&quot; Then
    
        Selection.Interior.Color = 13434879
    
    ElseIf CLR = &quot;MOMO&quot; Then
    
        Selection.Interior.Color = 16764159
    
    End If


End Sub
</pre></div>]]></content:encoded>
					
					<wfw:commentRss>https://nujonoa.com/vba-bor-mid/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>選択範囲の罫線とセルの色を設定するマクロ～データ集計業務に即したマクロVBA</title>
		<link>https://nujonoa.com/bor-thin/</link>
					<comments>https://nujonoa.com/bor-thin/#respond</comments>
		
		<dc:creator><![CDATA[nujonoa]]></dc:creator>
		<pubDate>Thu, 11 Apr 2019 15:17:49 +0000</pubDate>
				<category><![CDATA[マクロVBA]]></category>
		<category><![CDATA[マクロ]]></category>
		<category><![CDATA[vba]]></category>
		<category><![CDATA[罫線]]></category>
		<category><![CDATA[セル]]></category>
		<guid isPermaLink="false">http://nujonoa.com/?p=253</guid>

					<description><![CDATA[罫線を引きたいけど、xlEdgeTopなどなどのコードは忘れてしまいがちなので、覚えやすい名前に変更。また、同時に色も付けられる設定にしています。 選択範囲の罫線とセルの色の設定 Public Sub BOR_THIN( [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>罫線を引きたいけど、xlEdgeTopなどなどのコードは忘れてしまいがちなので、覚えやすい名前に変更。<br>また、同時に色も付けられる設定にしています。</p>



<h2 class="wp-block-heading">選択範囲の罫線とセルの色の設定</h2>



<p>Public Sub BOR_THIN(<span class="bold-red">FROM_Y, FROM_X, TO_Y, TO_X,</span> <span class="bold-blue">Optional BS = 0</span>, <span class="bold-green">Optional CLR = 0</span>)</p>



<p>・<span class="bold-red">(FROM_Y, FROM_X, TO_Y, TO_X）</span>で範囲の指定をしてください。  <br>　RANGE(CELLS(1,1),CELLS(2,2))→(1,1,2,2)です。</p>



<p>・<strong><span class="bold-blue">Optional BS = 0</span></strong> ,で罫線の種類を選択できます。<br>　"UE","SHITA","MIGI","HIDARI","ALL","JOUGE"何もなしだと外側を囲います。</p>



<p>・<span class="bold-green">Optional CLR = 0</span>　,で色を選択してください。<br>”RED”, ”YELLOW”, "BLUE”,”GREEN”,”HADA”,”MOMO”,から選べます。何もなしだと塗りつぶしなしです。</p>



<p></p>



<pre class="wp-block-code"><code>Sub TEST()
　　Call BOR_THIN(1, 1, 3, 4, "SITA", "RED")
end Sub

Public Sub BOR_THIN(FROM_Y, FROM_X, TO_Y, TO_X, Optional BS = 0, Optional CLR = 0)

    Range(Cells(FROM_Y, FROM_X), Cells(TO_Y, TO_X)).Select
 
    If BS = "ALL" Then
    
        Selection.Borders.Weight = xlThin
    
    ElseIf BS = "UE" Then
    
        Selection.Borders(xlEdgeTop).Weight = xlThin
    
    ElseIf BS = "SITA" Then
    
        Selection.Borders(xlEdgeBottom).Weight = xlThin
    
    ElseIf BS = "HIDARI" Then
    
        Selection.Borders(xlEdgeLeft).Weight = xlThin
        
    ElseIf BS = "JOUGE" Then

        Selection.Borders(xlEdgeRight).Weight = xlThin

    ElseIf BS = "MIGI" Then

        Selection.Borders(xlEdgeRight).Weight = xlThin
            
    Else
    
        Selection.BorderAround Weight:=xlThin
    
    End If

    
    If CLR = "RED" Then
    
        Selection.Interior.ColorIndex = 3
    
    ElseIf CLR = "YELLOW" Then
    
        Selection.Interior.ColorIndex = 6

    ElseIf CLR = "BLUE" Then
    
        Selection.Interior.ColorIndex = 34
    
    ElseIf CLR = "GREEN" Then
    
        Selection.Interior.ColorIndex = 35

    ElseIf CLR = "HADA" Then
    
        Selection.Interior.Color = 13434879
    
    ElseIf CLR = "MOMO" Then
    
        Selection.Interior.Color = 16764159    

    End If

End Sub</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://nujonoa.com/bor-thin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
