Category "vba"

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

WHERE clause with multiples conditions with values from the SELECT

I need to edit an old Access form. When a person enters information into a form field, a number associated to a name is found through a SQL SELECT statement. "S

How to speed up code to search many sheets

I have active sheet open (Sheet1). I want to pick a value from C column then go through each workbook and within each workbook there are many sheets. If that va

Create a new tab, copy data from another tab, and paste the data (with formatting) in the new tab

I have a tab called "Overview" where it asks me for the name of a project. Once I write the project name, I want a macro to grab the project name, create a new

Check Textbox text is excel valid formula and use that function to calculate in VBA without storing any value in excel sheet

I am trying to learn EXCEL VBA. One of the tasks I am stuck with is how to verify textbox1.text is valid excel formula. I tried Worksheetfunction.isfunction(use

Referencing cells from other sheets

I am trying to extract data from different sheets in a summary sheet. The referencing does not work. Sub Summary_LPI() Dim wkSht As Worksheet, wsC As Workshe

Change date values and retain format

I want to replace a repeating year of dates in a column. I started with a nested for loop in a single module, then I changed the code to be used for each sheet

Inserting a row in a Word table from Excel

I have an Excel spreadsheet that contains information to be put into a Word invoice template. I am able to populate header details, such as client name, address

Add Border Color to all tables Powerpoint VBA

Trying to add a border color to all tables in Powerpoint and failing. I'm not very good at this. Sub SetTableBorder() Dim oShp As Shape Dim oTbl As Table Dim oS

jso.numfields not returning anything within Excel VBA while connecting to PDF file

So I am trying to write a VBA Macro in Excel that will loop through all 400+ .pdf files I have in a folder, extract pertinent data from them, and store that dat

How do I select a slicer option based on the slicer item number if my pivot table is based on a data model?

I have this data table that updates everyday with new data and the pivot table and slicer refresh automatically through a macro. Now, I wanted to write a macro

How to insert when pasting column?

In a worksheet I would like to copy and paste columns with a button. It should copy two columns and insert them in the first free column that it can find. For e

Worksheet_Change Event only when call value changes

I want the user's name and the date to be entered into a specified column when any change is made. I also have a snippet of code that forces any data that is pa

Trimming site names

I'm trying to trim any combination of a webname to just web.co. Example 1.htt:pubhorn.co 2.www.pubhorn.co 3.htt://pubhorn.co 4.pubhorn.co/awawa I want to outpu