<?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>GASボタン</title>
	<atom:link href="https://office-automation-lab.com/tag/gas%E3%83%9C%E3%82%BF%E3%83%B3/feed/" rel="self" type="application/rss+xml" />
	<link>https://office-automation-lab.com</link>
	<description>AIとExcelで仕事を少しだけ楽にする方法を、リアルな体験と検証で発信</description>
	<lastBuildDate>Thu, 11 Jun 2026 12:57:29 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://office-automation-lab.com/wp-content/uploads/2026/06/cropped-サイト画像-32x32.jpg</url>
	<title>GASボタン</title>
	<link>https://office-automation-lab.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>GASでボタンを作成してスクリプトを実行する方法｜VBAのマクロボタンのように使う手順</title>
		<link>https://office-automation-lab.com/gas-button-run/</link>
					<comments>https://office-automation-lab.com/gas-button-run/#respond</comments>
		
		<dc:creator><![CDATA[mkhome_ai]]></dc:creator>
		<pubDate>Thu, 11 Jun 2026 12:57:28 +0000</pubDate>
				<category><![CDATA[GASの部屋]]></category>
		<category><![CDATA[GAS]]></category>
		<category><![CDATA[GASボタン]]></category>
		<category><![CDATA[GAS初心者]]></category>
		<category><![CDATA[GAS実行方法]]></category>
		<category><![CDATA[Google Apps Script]]></category>
		<category><![CDATA[Googleスプレッドシート]]></category>
		<category><![CDATA[業務効率化]]></category>
		<guid isPermaLink="false">https://office-automation-lab.com/?p=447</guid>

					<description><![CDATA[この記事では、Googleスプレッドシートでボタンを作成し、GASを実行する方法を解説します。 Excel VBAのマクロボタンと同じように使いたい方におすすめです。 GoogleスプレッドシートでGASをボタン実行する [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">この記事では、Googleスプレッドシートでボタンを作成し、GASを実行する方法を解説します。</p>



<p class="wp-block-paragraph">Excel VBAのマクロボタンと同じように使いたい方におすすめです。</p>



<h2 class="wp-block-heading">GoogleスプレッドシートでGASをボタン実行する手順</h2>



<ul class="wp-block-list">
<li>GASを作成する</li>



<li>図形や画像を挿入する</li>



<li>スクリプトを割り当てる</li>



<li>ボタンをクリックして実行する</li>
</ul>



<p class="wp-block-paragraph">一度設定すれば、ワンクリックで処理を実行できます。</p>



<h3 class="wp-block-heading">なぜボタンが必要なのか</h3>



<p class="wp-block-paragraph">GASはエディタから実行できます。</p>



<p class="wp-block-paragraph">しかし毎回エディタを開くのは手間です。</p>



<p class="wp-block-paragraph">ボタンを作成すれば、スプレッドシート上から簡単に実行できます。</p>



<h2 class="wp-block-heading">実行ボタンの設定方法</h2>



<h3 class="wp-block-heading">Step1：GASを作成する</h3>



<p class="wp-block-paragraph">まずは実行したいGASを作成します。<br>スプレッドシートから<br>「拡張機能」→「Apps Script」<br>を開いてスクリプトを作成してください。</p>



<p class="wp-block-paragraph"><br>GASコードの書き方はこちらの記事を<br>▶<a target="_blank" href="https://office-automation-lab.com/first-gas-code/" data-type="link" data-id="https://office-automation-lab.com/first-gas-code/">初めてのGASコードを書いてみよう</a></p>



<h3 class="wp-block-heading">Step2：図形描画でボタンを作成する</h3>



<p class="wp-block-paragraph">スプレッドシート上部メニューから<br>「挿入」→「図形描画」<br>を選択します。<br>すると図形描画の画面が表示されます。</p>



<p class="wp-block-paragraph">画面上部の「図形」アイコンをクリックし、<br>好きな図形を選択してください。<br>今回は角丸四角形がおすすめです。<br></p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" width="1023" height="408" src="https://office-automation-lab.com/wp-content/uploads/2026/06/図形の挿入.png" alt="" class="wp-image-450" style="aspect-ratio:2.5074160447761193;width:449px;height:auto" srcset="https://office-automation-lab.com/wp-content/uploads/2026/06/図形の挿入.png 1023w, https://office-automation-lab.com/wp-content/uploads/2026/06/図形の挿入-300x120.png 300w, https://office-automation-lab.com/wp-content/uploads/2026/06/図形の挿入-768x306.png 768w" sizes="(max-width: 1023px) 100vw, 1023px" /></figure>



<p class="wp-block-paragraph">図形を配置したら、<br>上部メニューの「テキストボックス」をクリックします。<br>図形の中をクリックして、</p>



<ul class="wp-block-list">
<li>実行</li>



<li>集計開始</li>



<li>メール送信</li>
</ul>



<p class="wp-block-paragraph">などの文字を入力します。</p>



<p class="wp-block-paragraph">入力が終わったら、<br>右上の「保存して終了」をクリックします。<br>作成したボタンがスプレッドシート上に表示されます。</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="382" src="https://office-automation-lab.com/wp-content/uploads/2026/06/テキスト追加-1024x382.png" alt="" class="wp-image-454" style="aspect-ratio:2.680712077391044;width:445px;height:auto" srcset="https://office-automation-lab.com/wp-content/uploads/2026/06/テキスト追加-1024x382.png 1024w, https://office-automation-lab.com/wp-content/uploads/2026/06/テキスト追加-300x112.png 300w, https://office-automation-lab.com/wp-content/uploads/2026/06/テキスト追加-768x287.png 768w, https://office-automation-lab.com/wp-content/uploads/2026/06/テキスト追加.png 1050w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Step3：シートに配置する</h3>



<p class="wp-block-paragraph">作成した図形をシート上に配置します。<br>サイズや位置は自由に調整できます。</p>



<h3 class="wp-block-heading">Step4：スクリプトを割り当てる</h3>



<p class="wp-block-paragraph">作成した図形をクリックします。<br>図形の右上に表示される<br>「︙」<br>をクリックしてください。<br>表示されたメニューから<br>「スクリプトを割り当て」<br>を選択します。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="451" height="264" src="https://office-automation-lab.com/wp-content/uploads/2026/06/スプリクト割付.png" alt="" class="wp-image-452" style="aspect-ratio:1.7083752589523529;width:316px;height:auto" srcset="https://office-automation-lab.com/wp-content/uploads/2026/06/スプリクト割付.png 451w, https://office-automation-lab.com/wp-content/uploads/2026/06/スプリクト割付-300x176.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></figure>



<p class="wp-block-paragraph">実行したい関数名を入力して<br>「OK」をクリックします。</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="417" height="262" src="https://office-automation-lab.com/wp-content/uploads/2026/06/スプリクト割付２-1.png" alt="" class="wp-image-456" style="aspect-ratio:1.5916383372099958;width:234px;height:auto" srcset="https://office-automation-lab.com/wp-content/uploads/2026/06/スプリクト割付２-1.png 417w, https://office-automation-lab.com/wp-content/uploads/2026/06/スプリクト割付２-1-300x188.png 300w" sizes="(max-width: 417px) 100vw, 417px" /></figure>



<p class="wp-block-paragraph">関数の確認方法は、</p>



<p class="wp-block-paragraph">「拡張機能」→「Apps Script」のコードを確認</p>



<p class="wp-block-paragraph">例<br>sendMail<br>createReport<br>sumData<br>※関数名のみ入力します。</p>



<p class="wp-block-paragraph">()は不要です。</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="336" src="https://office-automation-lab.com/wp-content/uploads/2026/06/関数名-1024x336.png" alt="" class="wp-image-455" style="aspect-ratio:3.047735132377119;width:454px;height:auto" srcset="https://office-automation-lab.com/wp-content/uploads/2026/06/関数名-1024x336.png 1024w, https://office-automation-lab.com/wp-content/uploads/2026/06/関数名-300x98.png 300w, https://office-automation-lab.com/wp-content/uploads/2026/06/関数名-768x252.png 768w, https://office-automation-lab.com/wp-content/uploads/2026/06/関数名.png 1042w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Step5：ボタンをクリックして実行する</h3>



<p class="wp-block-paragraph">作成したボタンをクリックします。</p>



<p class="wp-block-paragraph">初回実行時は権限の許可画面が表示されます。</p>



<p class="wp-block-paragraph">画面の案内に従って許可してください。</p>



<p class="wp-block-paragraph">▶<a target="_blank" href="https://office-automation-lab.com/gas-authorization-guide/" data-type="link" data-id="https://office-automation-lab.com/gas-authorization-guide/">【GAS】このアプリは Google で確認されていません｜原因と解決方法</a></p>



<h2 class="wp-block-heading">よくあるトラブル</h2>



<h3 class="wp-block-heading">ボタンを押しても何も起きない</h3>



<p class="wp-block-paragraph">症状<br>ボタンを押しても処理が実行されない</p>



<p class="wp-block-paragraph">原因<br>関数名の入力ミス</p>



<p class="wp-block-paragraph">解決方法<br>スクリプトを割り当ての関数名を確認する</p>



<h3 class="wp-block-heading">関数が見つかりませんと表示される</h3>



<p class="wp-block-paragraph">症状<br>エラーが表示される</p>



<p class="wp-block-paragraph">原因<br>存在しない関数名を指定している</p>



<p class="wp-block-paragraph">解決方法<br>GAS内の関数名と同じ名前を入力する</p>



<h3 class="wp-block-heading">権限エラーが表示される</h3>



<p class="wp-block-paragraph">症状<br>実行できない</p>



<p class="wp-block-paragraph">原因<br>Googleアカウントの許可が完了していない</p>



<p class="wp-block-paragraph">解決方法<br>権限許可を実施して再度実行する</p>



<h2 class="wp-block-heading">VBAのマクロボタンとの違い</h2>



<p class="wp-block-paragraph">Excel VBAのマクロボタンとほぼ同じ感覚で利用できます。</p>



<p class="wp-block-paragraph">違いは、</p>



<ul class="wp-block-list">
<li>Googleスプレッドシート上で動作する</li>



<li>初回のみ権限許可が必要</li>



<li>インターネット環境が必要</li>
</ul>



<p class="wp-block-paragraph">という点です。</p>



<p class="wp-block-paragraph">普段VBAを使っている方でも簡単に利用できます。</p>



<h2 class="wp-block-heading">関連するGAS記事</h2>



<p class="wp-block-paragraph">▶ <a target="_blank" href="https://office-automation-lab.com/what-is-gas/" data-type="link" data-id="https://office-automation-lab.com/what-is-gas/">GASとは何か｜初心者向け解説</a></p>



<p class="wp-block-paragraph">▶ <a target="_blank" href="https://office-automation-lab.com/gas-authorization-guide/" data-type="link" data-id="https://office-automation-lab.com/gas-authorization-guide/">【GAS】このアプリは Google で確認されていません｜原因と解決方法</a></p>



<p class="wp-block-paragraph">▶ <a target="_blank" href="https://office-automation-lab.com/gas-daily-trigger/" data-type="link" data-id="https://office-automation-lab.com/gas-daily-trigger/">GASを毎日自動実行する方法</a></p>



<h2 class="wp-block-heading">まとめ</h2>



<p class="wp-block-paragraph">GASはボタンを作成することで簡単に実行できます。<br>VBAのマクロボタンと同じ感覚で利用できるため初心者にもおすすめです。<br>まずは簡単なGASを作成してボタン実行を試してみましょう。</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://office-automation-lab.com/gas-button-run/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
