Category "vba"

How to combine or merge cells with the same values vertically and horizontally , Excel VBA?

I have sheet with same data in adjacent cells,I could to merge same cells on column A. now I need to merge or combine adjacent same cells beside merged cells on

CreateObject("System.Security.Cryptography.MD5CryptoServiceProvider") Fails on home PC works on Work PC

The following Single line of executable code; .. Works on my work PC (Win10 Pro 21H1) .. Crashes on my home laptop (Win 10 Pro 21H1) Exact same version of Excel

Run two variable loop to increment the column number for diff. sheets [closed]

I want to run this in loop by taking two variables for example i and j. Suppose i for sheet 1 and 2 and j for Sheet 3 until I dont reach the e

How to find inconsistencies in dates using VBA [closed]

I have an Excel file containing thousands of rows. There are ID, Planned End Date, and End Date columns. All IDs need to have at least one sam

Use cell value as worksheet name

Im new to VBA, and i have something i dont understand now. I've been trying to copy Worksheets by only copying Cells with a specific colour in a cell below. I w

Write to an existing .xlsm using pandas and XlsxWriter

I would like to write a dataframe to an existing .xlsm file which already has content. Write pandas dataframe to xlsm file (Excel with Macros enabled) describes

Most efficient way to have multiple criteria in an IF statement [closed]

Basically, I hoping to achieve 2 things here. I want to know if there is a way to make this multiple criteria IF statement shorter/more effici

Map SharePoint drive using VBA

I am trying to map a SharePoint document library so I can parse it with a FileSystemObject. Here is my code ... Dim objNetwork As Object Set objNetwork =

MATCH function doesn't find equal cells

I'm designing a datasheet that updates itself automatically. All of the macro code is working properly, but I have trouble locating the place where the data sho

Excel VBA to export specific sheets based on cell values to PDF

I would like to use cell values on Sheet 4 to select and export Sheet 1, Sheet 2, and Sheet 3 as one PDF file. For example, if Sheet 4's A1=1, A2=1, and A3=0,

Catia VBA, How to set table autoFit in drawing

I want to set a table autofit in Catia drawing. But I can't find any command. I'm looking forward to getting some guidance. Thanks [] There is my simple code. D

ActiveSheet.Paste Error on protected sheet

I have 2 worksheets (Input & Record), I just want to copy some data from "Input" to "Record", it worked but if I protect "Record".... Paste method of Worksh

Add new row, increment last digit in alphanumerial string from cell below

New in VBA, did tried different examples available on the web but can't make it work as my string only increment by 1 & subsequent executions, the string st

Masking Password in VBA Excel Input Box

Could someone please help me to mask the password entered to the input box generated using the below code. I will be using Office 365 ProPlus. Option Explicit P

How to get first names & last names of recipients of Outlook meeting invite?

I have a script to iterate through my calendar events that day and produce in a separate email a list in the following format: Event 1: Subject: When: Attendees

Two different error handlers in one procedure

I have two separate error handlers. Both look for if two separate workbooks are open. Sub ErrHandler() wbsource_name=ThisWorkbook.Worksheets("Sheet1").Range

Set table column widths in Word macro VBA

1. What I'm Trying To Do I have a folder with 84 Word documents (.docx). Every document contains a table of identical layout (some of the documents span across

Get files from Sharepoint / Onedrive via VBA

The code below uses FSO to read a file containing information such as version, date and file path on a local network, and download a file according to local fil

How to Group by Date Field in a PivotTable using win32com.client

I tried many approaches from last few hours but no luck. Somebody please help me. group_dt = pt.PivotFields('Created') group_dt.LabelRange.Group(Start=True, End

How to get the smtp email address located on the left of the "on behalf of" address

I would like to get the email address from the true contact that is sending the mailItem. I don't want the on behalf email address. Is there a way to do that? O