Category "vba"

Query to filter a table where a field can be a number or left empty

I created a form with 3 textboxes & a search button. Also a query that is setup to take the criteria in the textboxes & filter the results of a table wi

Populate combobox with unique numbers

The following code populates ComboBox on a userform in vba with unique values. I use the same code to populate two other ComboBoxes. It doesn't work when the da

Get the file list of a folder with Dir

I'm trying to get the file list of a folder in VBA The DIR command acts as if the * wildcard is messing up the whole mask that I input. Here is my file list: No

Application.Match gives type mismatch

I am trying to use Application.Match however it is returning a type mismatch error:13 error. Why? Dim mySrs as Series Dim ws as Worksheet set ws Activesheet Fo

Macro that needs to be more dynamic based on selection

I have this code and i find myself creating 12 times and modules since I have 12 different colleges, each with a unique names. I would like to make a bit more d

Import XML into Access with VBA

I have an XML file I'm trying to import into Access. I need help formatting the XSL transform to match the data. Right now, the XML imports as 3 separate tables

Trouble Connecting to SAP Through VBA in Excel Error 614

I'm trying to run a basic code I've found numerous places on here and elsewhere which should open SAP, input a command, and execute. I've gone as far as SAP ope

How to autofilter a column with values coming from a specific range

Hi all i hope you can help me with this issue since i just started learning VBA :) I need to autofilter a column of an excel sheet with the values coming from a

"Unable to set the CurrentPage property of the PivotField Class" with Pivot Table Filtering Attempt

So I have been trying to figure out what I am doing wrong for the past two days and I can't seem to get past this error. The error is "Unable to set the Current

refreshing dropdown list when source data changes

I am using the code below Private Sub Worksheet_Activate() MainSh.Range("D2").Select With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xl

Search entire document for String and Select all instances at once

I am new to VBA. I want to search a Word document for all occurrences of the string "the", and select all the occurrences at once. Currently, I have this code,

How do I reply to outlook mail using vba in excel with mail thread?

I am looking for VBA code in excel to reply to a selected mail but the below code creates seperate mail which does not have previous messages in conversation (t

use the same vba code for all of my combo boxes

So I had to create a couple of drop-down lists in Microsoft access and all of them are supposed to have different font colors. I did write the code for a single

How do you skip prefilled cells and also fill in the blank cells with no duplicates?

I am trying to skip cells that have prefilled data. If I were to select a day of the week in my schedule certain people would have the day off. I am trying to s

Error 400 when deleting strikethrough text

I have Excel VBA code to delete strikethrough text: Private Sub DelStrikethroughText() 'Deletes strikethrough text in all selected cells Dim Cell

Microsoft Office 365 Outlook. How to Change Teams-Meeting Join link

I want to create an Outlook Meeting, which references on a Microsoft Teams Team-Channel Meeting. I am searching for a way to change the link behind the Button y

Split string cell into multi rows but keep original row

I have a macro that splits a string (list of names) using a space as the delimiter and creates a new row for each name while keeping all data the same in other

PDDoc.Save Adobe Acrobat method not working in Excel VBA

Our office runs Arobat DC Pro and Excel 2016, we have been using the code below (scaled down version) in Excel VBA for years to save active Adobe PDF documents

Reading mail RTFbody fails with error 'not implemented'

I have code that reads mail to generate a task with the mail's content. In a few cases this hits a problem, when reading the RTFbody from the mail, saying "not

Is there a way to identify if a worksheet has a highlighted cell at a worksheet level, without checking all the cells?

Is there a way to identify if a worksheet has a highlighted cell at a worksheet level, without checking all the cells? Further context: I have a WorkBook with a