<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Documentation – Manage VBA Codes of Excel Macro-Enabled Workbook with Golang via C&#43;&#43;</title>
    <link>https://docs.aspose.com/cells/go-cpp/manage-vba-project/</link>
    <description>Recent content in Manage VBA Codes of Excel Macro-Enabled Workbook with Golang via C&#43;&#43; on Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="https://docs.aspose.com/cells/go-cpp/manage-vba-project/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Gocpp: Password Protect the VBA Project of Excel Workbook with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/password-protect-the-vba-project-of-excel-workbook/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/password-protect-the-vba-project-of-excel-workbook/</guid>
      <description>
        
        
        &lt;h2 id=&#34;password-protect-the-vba-project-of-excel-workbook-in-c&#34;&gt;&lt;strong&gt;Password-Protect the VBA Project of Excel Workbook in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;You can password protect the VBA (Visual Basic for Applications) Project of a workbook with Aspose.Cells using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/protect/&#34;&gt;&lt;strong&gt;VbaProject.Protect()&lt;/strong&gt;&lt;/a&gt; method.&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;43352067.xlsm&#34;&gt;sample Excel file&lt;/a&gt;, accesses its VBA Project, and protects it with a password. Finally, it saves it as the &lt;a href=&#34;43352068.xlsm&#34;&gt;output Excel file&lt;/a&gt;.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-PasswordProtectTheVbaProjectOfExcelWorkbook.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Find out if VBA Project is Protected with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/find-out-if-vba-project-is-protected/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/find-out-if-vba-project-is-protected/</guid>
      <description>
        
        
        &lt;h2 id=&#34;find-out-if-a-vba-project-is-protected-in-c&#34;&gt;&lt;strong&gt;Find out if a VBA Project Is Protected in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;You can determine whether the VBA (Visual Basic for Applications) project of your Excel file is protected using Aspose.Cells via the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/isprotected/&#34;&gt;&lt;strong&gt;VbaProject.IsProtected&lt;/strong&gt;&lt;/a&gt; property.&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code creates a workbook and then checks if its VBA project is protected or not. It then protects the VBA project and checks again whether the VBA project is protected. Please see its console output for reference. Before protection, &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/isprotected/&#34;&gt;&lt;strong&gt;VbaProject.IsProtected&lt;/strong&gt;&lt;/a&gt; returns &lt;strong&gt;false&lt;/strong&gt;, but after protection, it returns &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FindOutIfVbaProjectIsProtected.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;console-output&#34;&gt;&lt;strong&gt;Console Output&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;This is the console output of the above sample code for reference.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;n&#34;&gt;IsProtected&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Before&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Protecting&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;VBA&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Project&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;False&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;IsProtected&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;After&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Protecting&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;VBA&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Project&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;True&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

      </description>
    </item>
    
    <item>
      <title>Gocpp: Check if VBA Project is Protected and Locked for Viewing with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/check-if-vba-project-is-protected-and-locked-for-viewing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/check-if-vba-project-is-protected-and-locked-for-viewing/</guid>
      <description>
        
        
        &lt;h2 id=&#34;check-if-vba-project-is-protected-and-locked-for-viewing-in-c&#34;&gt;Check if VBA Project is Protected and Locked for Viewing in C++&lt;/h2&gt;
&lt;p&gt;Aspose.Cells allows you to check whether the VBA (Visual Basic for Applications) project of an Excel file is protected and locked for viewing. For this, the API provides the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/getislockedforviewing/&#34;&gt;&lt;strong&gt;VbaProject.GetIslockedForViewing()&lt;/strong&gt;&lt;/a&gt; property. If it is locked for viewing, the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/getislockedforviewing/&#34;&gt;&lt;strong&gt;VbaProject.GetIslockedForViewing()&lt;/strong&gt;&lt;/a&gt; property returns &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads the &lt;a href=&#34;43352065.xlsm&#34;&gt;sample Excel file&lt;/a&gt; and checks whether the VBA (Visual Basic for Applications) project of the Excel file is protected and locked for viewing. Please also see its console output for reference.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-CheckIfVbaProjectIsProtectedAndLockedForViewing.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;console-output&#34;&gt;&lt;strong&gt;Console Output&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;This is the console output of the above sample code when executed with the provided &lt;a href=&#34;43352065.xlsm&#34;&gt;sample Excel file&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;n&#34;&gt;Is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;VBA&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Project&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Locked&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Viewing&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;True&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

      </description>
    </item>
    
    <item>
      <title>Gocpp: Assign Macro to Form Control with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/assign-macro-to-form-control/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/assign-macro-to-form-control/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells allows you to assign a macro code to a form control like a button. Please use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/shape/getmacroname/&#34;&gt;&lt;strong&gt;Shape.GetMacroName()&lt;/strong&gt;&lt;/a&gt; property to assign a new macro code to a form control inside the workbook.
&lt;/div&gt;

&lt;p&gt;The following sample code creates a new workbook, assigns a macro code to a form button, and saves the output in the XLSM format. Once you open the output XLSM file in Microsoft Excel, you will see the following macro code.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt; &lt;span class=&#34;n&#34;&gt;Sub&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;ShowMessage&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;MsgBox&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;Welcome to Aspose!&amp;#34;&lt;/span&gt;

&lt;span class=&#34;n&#34;&gt;End&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Sub&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;assign-macro-to-form-control-in-c&#34;&gt;&lt;strong&gt;Assign Macro to Form Control in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Here is the sample code to generate the output XLSM file with a macro code.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-AssignMacroToFormControl.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Check if VBA project in a Workbook is Signed with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/check-if-vba-project-in-a-workbook-is-signed/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/check-if-vba-project-in-a-workbook-is-signed/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

You can check if your VBA project is signed or not using Microsoft Excel via &lt;strong&gt;Tools &amp;gt; Digital Signatures&amp;hellip;&lt;/strong&gt; menu command. Similarly, you can check it programmatically using Aspose.Cells &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/issigned/&#34;&gt;&lt;strong&gt;Workbook.VbaProject.IsSigned&lt;/strong&gt;&lt;/a&gt;.
&lt;/div&gt;

&lt;h2 id=&#34;check-if-vba-project-in-a-workbook-is-signed-in-c&#34;&gt;&lt;strong&gt;Check if VBA project in a Workbook is Signed in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following code loads the workbook and checks if its VBA project is signed using &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/issigned/&#34;&gt;&lt;strong&gt;Workbook.VbaProject.IsSigned&lt;/strong&gt;&lt;/a&gt; property. The property will return &lt;strong&gt;true&lt;/strong&gt; if the project is signed, otherwise it will return &lt;strong&gt;false&lt;/strong&gt;.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-CheckIfVbaProjectInAWorkbookIsSigned.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Add a library reference to the VBA project in workbook with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/add-a-library-reference-to-vba-project-in-workbook/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/add-a-library-reference-to-vba-project-in-workbook/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Sometimes, you need to add or register a library reference to the VBA project through code. You can do it using Aspose.Cells &lt;strong&gt;VbaProject.References.AddRegisteredReference()&lt;/strong&gt; method.
&lt;/div&gt;

&lt;h2 id=&#34;add-a-library-reference-to-a-vba-project-in-microsoft-excel&#34;&gt;&lt;strong&gt;Add a library reference to a VBA project in Microsoft Excel&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In Microsoft Excel, you can add a library reference to the VBA project by manually clicking &lt;strong&gt;Tools &amp;gt; References&amp;hellip;&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;add-a-library-reference-to-the-vba-project-in-a-workbook-using-asposecells&#34;&gt;&lt;strong&gt;Add a library reference to the VBA project in a workbook using Aspose.Cells&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code adds or registers two library references to the VBA project in the workbook using the &lt;strong&gt;VbaProject.References.AddRegisteredReference()&lt;/strong&gt; method.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-AddALibraryReferenceToVbaProjectInWorkbook.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Export VBA Certificate to File or Stream with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/export-vba-certificate-to-file-or-stream/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/export-vba-certificate-to-file-or-stream/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells allows you to export the VBA digital certificate to a stream, such as a file or a memory stream. You can access the raw data of the VBA digital certificate using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/getcertrawdata/&#34;&gt;&lt;strong&gt;Workbook.GetCertRawData()&lt;/strong&gt;&lt;/a&gt; property.
&lt;/div&gt;

&lt;h2 id=&#34;export-vba-certificate-to-file-or-stream-in-c&#34;&gt;&lt;strong&gt;Export VBA Certificate to File or Stream in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code that saves the raw data of the VBA certificate into a file. You can download the &lt;a href=&#34;5115031.xlsm&#34;&gt;sample Excel file used in this code&lt;/a&gt; from the provided link.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-ExportVbaCertificateToFileOrStream.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Check if VBA Code is Signed with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/check-if-vba-code-is-signed/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/check-if-vba-code-is-signed/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells allows the user to check if the VBA code project is signed. Please use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/issigned/&#34;&gt;&lt;strong&gt;VbaProject::IsSigned&lt;/strong&gt;&lt;/a&gt; property to determine whether the VBA code project is signed.
&lt;/div&gt;

&lt;p&gt;The following code demonstrates how to check if the VBA code is signed using the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/issigned/&#34;&gt;&lt;strong&gt;VbaProject::IsSigned&lt;/strong&gt;&lt;/a&gt; property. You can use any of your Excel files to test this code. For testing purposes, you can use &lt;a href=&#34;5115032.xlsm&#34;&gt;this Excel file used in the code&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;check-if-vba-code-is-signed-in-c&#34;&gt;&lt;strong&gt;Check if VBA Code is Signed in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-CheckIfVbaCodeIsSigned.go&#34;&gt;&lt;/script&gt;

&lt;h2 id=&#34;console-output&#34;&gt;Console Output&lt;/h2&gt;
&lt;p&gt;Below is the console output of the above code using the &lt;a href=&#34;5115032.xlsm&#34;&gt;sample Excel file&lt;/a&gt; provided by the link.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;  

&lt;span class=&#34;nx&#34;&gt;Is&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;VBA&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Code&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Project&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Signed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;True&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

      </description>
    </item>
    
    <item>
      <title>Gocpp: Digitally Sign a VBA Code Project with Certificate in C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/digitally-sign-a-vba-code-project-with-certificate/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/digitally-sign-a-vba-code-project-with-certificate/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

&lt;p&gt;You can digitally sign your VBA code project using Aspose.Cells with its &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/sign/&#34;&gt;&lt;strong&gt;Workbook.VbaProject.Sign()&lt;/strong&gt;&lt;/a&gt; method. Please follow these steps to verify whether your Excel file is digitally signed with a certificate.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Visual Basic&lt;/strong&gt; from the &lt;strong&gt;Developer&lt;/strong&gt; tab to open &lt;strong&gt;Visual Basic for Applications IDE&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Tools&lt;/strong&gt; &amp;gt; &lt;strong&gt;Digital Signatures&amp;hellip;&lt;/strong&gt; in the &lt;strong&gt;Visual Basic for Applications IDE&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It will show the &lt;strong&gt;Digital Signature Form&lt;/strong&gt; indicating whether the document is digitally signed with a certificate or not.&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;digitally-sign-a-vba-code-project-with-certificate-in-c&#34;&gt;&lt;strong&gt;Digitally Sign a VBA Code Project with Certificate in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code illustrates how to use the &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbaproject/sign/&#34;&gt;&lt;strong&gt;Workbook.VbaProject.Sign()&lt;/strong&gt;&lt;/a&gt; method. Here are the input and output files of the sample code. You can use any Excel file and any certificate to test this code.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;5115028.xlsm&#34;&gt;Source Excel file&lt;/a&gt; used in the sample code.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;5115039.pfx&#34;&gt;Sample pfx file&lt;/a&gt; to create a digital signature. Please install it on your computer to run this code. Its password is &lt;strong&gt;1234&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;5115029.xlsm&#34;&gt;Output Excel file&lt;/a&gt; generated by the sample code.&lt;/li&gt;
&lt;/ul&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-DigitallySignAVbaCodeProjectWithCertificate.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Check if Digital Signature of VBA Code is Valid with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/check-if-digital-signature-of-vba-code-is-valid/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/check-if-digital-signature-of-vba-code-is-valid/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-primary&#34; role=&#34;alert&#34;&gt;

Aspose.Cells allows you to check if the digital signature of the VBA code is valid using the &lt;strong&gt;Workbook.VbaProject.IsValidSigned&lt;/strong&gt; property. It will return &lt;strong&gt;true&lt;/strong&gt; if the signature is valid; otherwise, it will return &lt;strong&gt;false&lt;/strong&gt;. The digital signature of the VBA code becomes invalid when you change the VBA code.
&lt;/div&gt;

&lt;h2 id=&#34;check-if-digital-signature-of-vba-code-is-valid-in-c&#34;&gt;&lt;strong&gt;Check if Digital Signature of VBA Code is Valid in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following code demonstrates the usage of this property using the sample &lt;strong&gt;Excel&lt;/strong&gt; file (&lt;strong&gt;5115030.xlsm&lt;/strong&gt;), which you can download from the provided link. The same Excel file has a valid signature, but when we modify its VBA code, save the workbook, and then re‑check, we find that its signature has become invalid.&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-CheckIfDigitalSignatureOfVbaCodeIsValid.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: Copy VBA Macro UserForm DesignerStorage from Template to Target Workbook with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/copy-vba-macro-userform-designerstorage-from-template-to-target-workbook/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/copy-vba-macro-userform-designerstorage-from-template-to-target-workbook/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Aspose.Cells allows you to copy a VBA project from one Excel file into another Excel file. A VBA project consists of various types of modules, such as Document, Procedural, Designer, etc. All modules can be copied with simple code, but for the Designer module there is extra data called Designer Storage that must be accessed or copied. The following two methods deal with Designer Storage:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbamodulecollection/getdesignerstorage/&#34;&gt;&lt;strong&gt;VbaModuleCollection.GetDesignerStorage()&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbamodulecollection/adddesignerstorage/&#34;&gt;&lt;strong&gt;VbaModuleCollection.AddDesignerStorage()&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;copy-vba-macro-userform-designerstorage-from-template-to-target-workbook&#34;&gt;&lt;strong&gt;Copy VBA Macro UserForm DesignerStorage from Template to Target Workbook&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Please see the following sample code. It copies the VBA project from the &lt;a href=&#34;50528345.xlsm&#34;&gt;template Excel file&lt;/a&gt; into an empty workbook and saves it as the &lt;a href=&#34;50528346.xlsm&#34;&gt;output Excel file&lt;/a&gt;. If you open the VBA project inside the template Excel file, you will see a User Form as shown below. The User Form consists of Designer Storage, so it will be copied using &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbamodulecollection/getdesignerstorage/&#34;&gt;&lt;strong&gt;VbaModuleCollection.GetDesignerStorage()&lt;/strong&gt;&lt;/a&gt; and &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/vbamodulecollection/adddesignerstorage/&#34;&gt;&lt;strong&gt;VbaModuleCollection.AddDesignerStorage()&lt;/strong&gt;&lt;/a&gt; methods.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img src=&#34;copy-vba-macro-userform-designerstorage-from-template-to-target-workbook_1.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The following screenshot shows the output Excel file and its contents, which were copied from the template file. When you click Button 1, it opens the VBA User Form, which contains a command button that displays a message box when clicked.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img src=&#34;copy-vba-macro-userform-designerstorage-from-template-to-target-workbook_2.png&#34; alt=&#34;todo:image_alt_text&#34;&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-CopyVbaMacroUserformDesignerstorageFromTemplateToTargetWorkbook.go&#34;&gt;&lt;/script&gt;

&lt;button class=&#34;floating-button&#34; id=&#34;openModalBtn&#34;&gt;AI Document Assistant&lt;/button&gt;

&lt;div class=&#34;modal&#34; id=&#34;modal&#34;&gt;
    &lt;button class=&#34;close-btn&#34; id=&#34;closeModalBtn&#34;&gt;Close&lt;/button&gt;
    &lt;iframe src=&#34;https://products.aspose.ai/cells/chat/document/go?source=docs&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;style&gt;
    .floating-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: #007bff;
        color: white;
        border: none;
        padding: 15px 20px;
        border-radius: 50px;
        cursor: pointer;
        font-size: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .modal {
        display: none;
        position: fixed;
        top: 10%;
        left: 10%;
        width: 80%;
        height: 80%;
        background-color: white;
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        padding: 20px;
        box-sizing: border-box;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: #f44336;
        color: white;
        border: none;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 16px;
        border-radius: 3px;
    }
&lt;/style&gt;

&lt;script&gt;
    const openModalBtn = document.getElementById(&#39;openModalBtn&#39;);
    const closeModalBtn = document.getElementById(&#39;closeModalBtn&#39;);
    const modal = document.getElementById(&#39;modal&#39;);

    openModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;block&#39;;
    });

    closeModalBtn.addEventListener(&#39;click&#39;, function() {
        modal.style.display = &#39;none&#39;;
    });

    window.addEventListener(&#39;click&#39;, function(event) {
        if (event.target === modal) {
            modal.style.display = &#39;none&#39;;
        }
    });
&lt;/script&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Gocpp: Filter VBA Project while loading a workbook with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/filter-vba-project-while-loading-a-workbook/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/filter-vba-project-while-loading-a-workbook/</guid>
      <description>
        
        
        &lt;h2 id=&#34;filter-vba-project-while-loading-an-excel-workbook-in-c&#34;&gt;&lt;strong&gt;Filter VBA Project while loading an Excel workbook in C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Some .xlsm/.xlsb files contain an extremely large amount of macros (or very, very long macros). Aspose.Cells will unconditionally load this (meta) data when opening such workbooks. You may need to control this though &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/loaddatafilteroptions&#34;&gt;&lt;strong&gt;LoadDataFilterOptions&lt;/strong&gt;&lt;/a&gt; when you really only need to extract sheet names for a large number of workbooks, thus skipping over such unneeded content. This filter is provided via a new option, &lt;a href=&#34;https://reference.aspose.com/cells/go-cpp/loaddatafilteroptions&#34;&gt;&lt;strong&gt;LoadDataFilterOptions.VBA&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;sample-code&#34;&gt;&lt;strong&gt;Sample Code&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code loads a workbook such that only VBA is filtered. A sample file for testing this feature can be downloaded from the following link:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;79527938.xlsm&#34;&gt;sampleMacroEnabledWorkbook.xlsm&lt;/a&gt;&lt;/p&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-FilterVbaProjectWhileLoadingAWorkbook.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
    <item>
      <title>Gocpp: How to Prevent Users from Printing Excel File with Golang via C&#43;&#43;</title>
      <link>https://docs.aspose.com/cells/go-cpp/how-to-prevent-printing-excel/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://docs.aspose.com/cells/go-cpp/how-to-prevent-printing-excel/</guid>
      <description>
        
        
        &lt;h2 id=&#34;possible-usage-scenarios&#34;&gt;&lt;strong&gt;Possible Usage Scenarios&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;In our daily work, there may be some important information in an Excel file; in order to protect internal data from being spread, the company may prohibit printing it. This document explains how to prevent others from printing Excel files.&lt;/p&gt;
&lt;h2 id=&#34;how-to-prevent-users-from-printing-file-in-ms-excel&#34;&gt;&lt;strong&gt;How to Prevent Users from Printing File in MS-Excel&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;You can apply the following VBA code to protect your specific file from being printed.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the workbook that you do not allow others to print.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Developer&lt;/strong&gt; tab in the Excel ribbon and click on the &lt;strong&gt;View Code&lt;/strong&gt; button in the &lt;strong&gt;Controls&lt;/strong&gt; section. Alternatively, you can hold down the &lt;strong&gt;ALT + F11&lt;/strong&gt; keys to open the Microsoft Visual Basic for Applications window.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;img src=&#34;1.png&#34; width=70% /&gt;&lt;/li&gt;
&lt;li&gt;Then, in the left Project Explorer, double‑click on &lt;strong&gt;ThisWorkbook&lt;/strong&gt; to open the module and add some VBA code.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;img src=&#34;2.png&#34; width=70% /&gt;&lt;/li&gt;
&lt;li&gt;Then save and close the code, return to the workbook, and when you attempt to print the sample file, printing will be blocked and you will see the following warning box:&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;img src=&#34;3.png&#34; width=70% /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;how-to-prevent-users-from-printing-excel-file-using-asposecells-for-c&#34;&gt;&lt;strong&gt;How to Prevent Users from Printing Excel File using Aspose.Cells for C++&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The following sample code illustrates how to prevent users from printing an Excel file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Load the &lt;a href=&#34;sample.xlsx&#34;&gt;sample file&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Get the &lt;strong&gt;VbaModuleCollection&lt;/strong&gt; object from the &lt;strong&gt;VbaProject&lt;/strong&gt; property of the &lt;strong&gt;Workbook&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Get the &lt;strong&gt;VbaModule&lt;/strong&gt; object via the “ThisWorkbook” name.&lt;/li&gt;
&lt;li&gt;Set the &lt;strong&gt;Code&lt;/strong&gt; property of the &lt;strong&gt;VbaModule&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Save the sample file to &lt;a href=&#34;out.xlsm&#34;&gt;xlsm format&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;script type=&#34;application/javascript&#34; src=&#34;https://gist.github.com/aspose-cells-gists/b414abd53259bbc47d2c3c0fe985395b.js?file=Examples-Go-CPP-ExcelPreventPrinting.go&#34;&gt;&lt;/script&gt;


      </description>
    </item>
    
  </channel>
</rss>
