Category "vba"

How to bypass code if criteria don't match?

The code works when the criteria exists. I get an error when the criteria doesn't exist. ' Define constants. Const srcName As String = "wfm_rawdata" Const srcFi

outlook vba code to display pictures in email

By default, my MS Outlook 2013 is set NOT to download images in received HTML e-mail messages. I would like to keep this setting. There are some senders whose

Trying to reverse ObjPtr to an Object I'm getting kernel not found error 53 in 64 bits but not in 32 bits

I'm referring Parent class from Child class; instead of simply do, for example: Public Property Set Parent(obj As ClassProperties) Set this.ParentColl = ob

Extract text string from undeliverable email body to Excel

I am trying to extract the email address from each individual undeliverables email body. The email body would be like: ----------------------------Email-------

Use ScriptControl to parse JSON in VBA: transform result to dictionaries and collections

I would like to use Microsoft ScriptControl to parse a JSON string in VBA, and then transform the resulting Object into Dictionary and Collection objects. I alr

Fill an Outlook email template using words from a Word document using VBA

I am creating a Word document which contains macros that will convert the .doc to .PDF, and include it as an attachment in an autogenerated Outlook email contai

Opening Userform only without flashing Excel Window

I know the method as Application.Visible = False and Application.Screenupdating = False When opening the file, I want the user to see only the userform. The

Move mail to "Junk Email" folder and create a spam rule

I'd like to move the selected email to the "Junk Email" folder and create a spam rule for that email address that automatically sends all future emails from tha

Cycle through the tabs and reformat the columns

I have an Excel document consisting of data imported into multiple tabs. The columns in each tab are stretched out and hard to read. I am trying to cycle throug

How to add links to all Heading 1 style text?

The code is intended to add the same hyperlink to all Heading 1 style text. (Purpose: clicking any heading brings you to the top of the document). It works for

Get multiline text from textarea with Selenium VBA

I need to get multiline text from textarea element of web-page. I see in Chrome developer tool that text I need is stored in value property of textarea. I marke

Cannot fully intercept or trap SaveAs Dialog

With the help of the web, I have been able to write some VBA to check content controls on a Word 2013 template document and use the content to create a filename

Excel VBA ComboBox DropDown Button Size--changed itself

I have a workbook with several comboboxes (and listboxes) and a lot of vba written around them. I've used the same code in the Workbook_Open procedure to format

Excel VBA - exit for loop

I would like to exit my for loop when a condition inside is met. How could I exit my for loop when the if condition has been met? I think some kind of exit at t

Create SHA256 COM Object in Access VBA

I'm trying to create a SHA256 object from MS Access VBA. I'm running Access 2016 on a Windows machine with .NET 4.8. Public Function Base64_HMACSHA256(ByVal sTe

Allow Select all that Apply in Excel in Multiple Columns on the same sheet

I am creating an activity tracker in Excel. I'd like to be able to "Select all that apply" from drop down lists in two separate columns on the same sheet. I am

Do While loop to blink cell every second is killing performance

I wrote a macro to check if a date is the last day of a month. If so this cell should blink every 1 second, so I'm calling a Do While loop. I want to start the

Use multiple custom lists to sort

I'm trying to use two custom lists to order the columns in a specific reach. First I define the two custom lists (arrays) and in the .Sort statement I give the

How to make all series in a chart the same color?

How do I color all the series (lines) in a specific (selected/current) chart the same color? I have the following, but it does nothing: Sub Same_Color() Dim

Is the poor performance of Excel VBA auto-instancing a myth?

The accepted wisdom is that using a construct like Dim dict As New Dictionary is poorer in performance than Dim dict As Dictionary / Set dict = New Dictionary.