Category "vba"

Out of Memory Error when running Drill Down Script

The purpose of the macro is to avoid creating a new worksheet each time a user double clicks / drills down on a pivot table value. Instead the script copies the

Excel Single Use Dropdownlist

My problem is the following. I have two tables. The first table is a guest list where the information on who is the guest and how many beds he need is stored. S

Overflow when looping through SQL-inserts for an ADODB.connection

I am trying to insert real-time data from a financial service provider into Excel, which can only be fetched with an Excel-plugin in blocks of roughly 100,000 v

How to multiply a range of values in Excel by a scalar variable using VBA - Answer to similarly asked question is not working for me

I have implemented this method to multiply every array element by a number held in a variable, it works, but I believe it is terribly slow. Is there an accepted

How to make custom references in an Excel row with specific rules ? with VBA or Excel formula

I Want to customise automatically in Excel a Reference number according to the content of the line it is representing. I have a table for test procedure that lo

How to detect if texts are deleted in multiple cells that are not adjacent to each other?

I want to detect if text/values are being deleted from a number of cells that are not located adjacent to each other so I can execute a routine. As an example I

VBA is sometimes not recognizing Excel file that has been opened through SAP GUI script

I have a SAP GUI script running every day in VBA. In the script I am exporting some data from SAP to several different Excel files, and these are saved to a net

excel button connected to macro having runtime issue

My vba code connected to a button is crashing on runtime. It is stating sub or function not defined. I am new to vba code so I dont know how to solve this. It a

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