Category "vba"

Filtering multiple fields from a form to open a report

MS Access Database: I have a report that I want to open from a form with multiple filter fields. Each filter works fine when used individually. They do not wo

Automatically download MS Forms Data via VBA

I use a MS Form to collect Data and use an xlsm.file where I copy the new data and then further work with the data. In order to update the data, I have to Open

How to insert a column in Excel using VBA?

Please help me with the code to insert a column in excel using vba. Here is what I am doing - Sheet1.Range("A:A").EntireColumn.insert

Workbook_Open throws an error that manual run does not

When running automatically via Workbook_Open, it throws a 91 error. However, running the same code manually does not. It's machine specific. No problems on a

Will IE removal from Windows impact XMLHTTP60?

When IE gets removed from Windows, will this impact XMLHTTP60 and my Excel VBA code? How could one confirm?

openpyxl: ValueError: Value must be one of {'selection', 'data', 'field'}

There is an xlsm file which I need to open and edit and extract data as per the macros enabled in the sheet. But I'm not able to open the file itself. I tried:

SAX Parser in VBA

I am working on a vba macro to parse large xml files. Initially, i made use of DOM parser but due to memory leak the system hangs and that could not solve my pr

set reply arrow via vba

I was wondering if there is a way to add the Reply arrow to a selected mail in Outlook via VBA. The background is that we process a selected mail via VBA and cr

Error when pasting in excel from pdf with SendKeys

I am trying to copy a whole pdf document into excel using the following code. The code works perfectly except for the paste part, when it gives me the following

Is it possible to have multiple loops that run independently?

I am trying to insert 2 different ranges "x" amount of times based on the input from the user. The user chooses how many mounts they need "D22" and a range is c

I have a function extracting .JPG from sharepoint URL's but when I use it the data is unreadable

'This code generates files that cannot be opened Sub DownloadPicturestoFile() Dim FileUrl As String Dim objXmlHttpReq As Object Dim objStream As Object Dim Nam

unable to wrap text in word document using VBA

I have an input text file(Line size and column size varies). I want to convert it into document with the same format(same length as in text file, not to span to

Use button to add a group of buttons to sheet

In my vba code right now the goal is to add a plus and minus button every time the add button is pressed. As you can see in the gif when the user presses add a

VBA script that opens windows explorer and points to a file that copies values from one workbook to another

I have a VBA script that copies and paste data from one workbook to another, but I would like to get my script so when I click run, windows explorer window open

Python mouse and keyboard recorder that switch lines in Excel

I have a Excel file containing data for simulations. Each row is a simulation and contains data that i want to copy and paste into another software at a specifi

Replace spacebar symbol with random word in VBA Word

I've been stuck with this code for MS Word. My task is to change every spacebar in document with a random word from array. I mean to put random word in document

Trying to filter data for each sheet using VBA

I currently have this code : Sub FilterRows() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets Sheets(ws).Range("A1").AutoFilter

How to save a workbook using a value from a referenced cell as the file name?

I am trying to save a workbook with the value from a cell as the file name. This code will save it as a specific file name, ActiveSheet.SaveAs FileName:="C:\Des

Working code gives error when run on any other PC

I have working code that requests information from a website. When I send the file to another PC and run the code, I get: "Run-time error'91': Object variable

Reset range selection

I track our writers' monthly payments, and have created a workbook with a worksheet including a summary of each writer's pay. The sheet includes a vlookup that