1,629 questions with Developer technologies | Visual Basic for Applications tags

Sort by: Updated
2 answers

Excel Update Broke PivotCache VBA Functionality — Request for Fix or Escalation

Since a recent Microsoft 365 Excel update ~January 24/25, multiple VBA procedures that interact with PivotCaches and update PivotTables have stopped functioning across our organization. These macros have worked reliably for years and stopped functioning…

Developer technologies | Visual Basic for Applications
asked 2026-01-28T19:16:45.0766667+00:00
Murray, ThomasJ (Penske) 15 Reputation points
edited an answer 2026-05-03T07:09:12.4066667+00:00
ychi-7143 0 Reputation points
2 answers

How can I read an excel sheet from AccessCan I

Can I open and read an excel sheet from a VB procedure in Access

Developer technologies | Visual Basic for Applications
asked 2026-04-30T14:02:34.5833333+00:00
Jackie Beedie 0 Reputation points
commented 2026-05-01T04:28:00.09+00:00
DJ 0 Reputation points
2 answers

Application.Wait

give me an example of Application.Wait in VBA code.

Developer technologies | Visual Basic for Applications
asked 2026-04-30T14:32:24.8266667+00:00
Randy Avery 0 Reputation points
edited an answer 2026-05-01T03:24:27.8466667+00:00
Nancy Vo (WICLOUD CORPORATION) 3,385 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

Word finding X at the beginning of numerals

Hello from Steve Is it possible please using the below [0-9XL]{5} to also find X at the beginning. For example X9937 Sub Test () Selection.Find.ClearFormatting With Selection.Find .Text = "[0-9XL]{5}" .Replacement.Text =…

Developer technologies | Visual Basic for Applications
asked 2026-04-20T04:03:02.13+00:00
SteveD 310 Reputation points
accepted 2026-05-01T01:44:37.6366667+00:00
SteveD 310 Reputation points
2 answers One of the answers was accepted by the question author.

Using VBA to select text.

Hello from Steve Is this possible please to select text 5PBPX using VBA Mod moved from : Microsoft 365 and Office | Word | For home | Windows

Developer technologies | Visual Basic for Applications
asked 2026-04-20T21:09:48.78+00:00
SteveD 310 Reputation points
accepted 2026-05-01T01:30:29.02+00:00
SteveD 310 Reputation points
1 answer One of the answers was accepted by the question author.

In Excel, I am in need of having more than one dropdown list in a worksheet, and I must be able to make multiple selections in each one.

I am familiar with VBA code and the Data Validation features built into Excel, but I cannot find a way to apply the VBA code to more than one dropdown list. I note that there is no dependency between each of the dropdown lists. In other words, the…

Developer technologies | Visual Basic for Applications
asked 2026-04-29T16:06:10.9133333+00:00
Fernando Castro 20 Reputation points
commented 2026-04-30T20:21:43.27+00:00
Fernando Castro 20 Reputation points
2 answers

Office 365 Update version 2604

Anybody else having issues with the latest Update blocking exchanges between Excel and Outlook using the Outlook.MailItem, have rolled back to 2603 and the VBA MAcro is working perfectly again.

Developer technologies | Visual Basic for Applications
asked 2026-04-27T18:23:51.8833333+00:00
andy 0 Reputation points
edited a comment 2026-04-29T23:58:40.3133333+00:00
Hornblower409 8,195 Reputation points
2 answers

Rename Module

I want to rename a module in my VB project in Excel

Developer technologies | Visual Basic for Applications
asked 2026-04-23T12:21:20.83+00:00
Donnie Urbano 0 Reputation points
commented 2026-04-29T02:33:30.55+00:00
Nancy Vo (WICLOUD CORPORATION) 3,385 Reputation points Microsoft External Staff Moderator
2 answers

Outlook, Character Counter, VBA

Good afternoon. I'm familiar with the character counter in Word. I checked the customize ribbon tool, and do not see character counter in outlook. At this point, I'd like to do a VBA tool to count characters/spaces in my emails. It's part of a…

Outlook | Windows | Classic Outlook for Windows | For business
Developer technologies | Visual Basic for Applications
asked 2022-01-28T00:53:44.547+00:00
Steve B 1 Reputation point
answered 2026-04-28T13:54:53.9666667+00:00
umer 0 Reputation points
2 answers

vba: I would like to add bold attribute to certain words (names) in an array

Hello from Steve I would like to please add bold text Sub Rename_Trainers() Dim FindArray As Variant Dim ReplArray As Variant Dim i As Long FindArray = Array("RICHARDSON NORV", "D & B WEATHERLE", "THURLOW O'MALLE",…

Developer technologies | Visual Basic for Applications
asked 2026-04-14T01:44:39.2033333+00:00
SteveD 310 Reputation points
recommended 2026-04-28T12:26:45.6966667+00:00
Dustin-TP 5 Reputation points Microsoft External Staff Moderator
2 answers

vba: Compile Error: Expected variable or procedure, not module

Hello from Steve Compile error: Expected variable or procedure, not module Sub AddZeroBeforeThreeDigits() With Selection.Find .ClearFormatting .Replacement.ClearFormatting ' Find any 3-digit number as a group .Text =…

Developer technologies | Visual Basic for Applications
asked 2026-04-19T21:50:34.99+00:00
SteveD 310 Reputation points
commented 2026-04-27T08:39:04.6333333+00:00
SteveD 310 Reputation points
2 answers

Worksheet protection for users

I want to protect worksheets for users and grand vba all rights to adjust cells and add and delete listrows on tables

Developer technologies | Visual Basic for Applications
asked 2026-04-22T20:37:04.0666667+00:00
Carlusha99 0 Reputation points
commented 2026-04-27T08:26:38.19+00:00
Jack Dang (WICLOUD CORPORATION) 17,170 Reputation points Microsoft External Staff Moderator
2 answers

Word Find second occurrence

Hello from Steve I have two "Word Files: opened Window 1 and Window 2 Objective please is to find second occurrence and selecting the text to copy using the below script Window 1 7 PLATINUM NORWAY Now find using the below script to find it in Window…

Developer technologies | Visual Basic for Applications
asked 2026-04-25T20:54:40.5033333+00:00
SteveD 310 Reputation points
commented 2026-04-27T04:26:42.6966667+00:00
SteveD 310 Reputation points
3 answers One of the answers was accepted by the question author.

Word How to loop

Hello from Steve How do I put in the below Script please Sub Scratched() Selection.Find.ClearFormatting With Selection.Find .Text = "Scratched" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop …

Developer technologies | Visual Basic for Applications
asked 2026-04-26T03:36:44.3033333+00:00
SteveD 310 Reputation points
commented 2026-04-27T04:24:35.14+00:00
Nancy Vo (WICLOUD CORPORATION) 3,385 Reputation points Microsoft External Staff Moderator
3 answers One of the answers was accepted by the question author.

Excel Row Height

Hello from Steve I would like please only Row 1 to Row 300 to have row height adjusted. Sub RowHeight() Cells.Select Selection.RowHeight = 20.25 End Sub Mod moved from : Microsoft 365 and Office | Excel | For home | Windows

Developer technologies | Visual Basic for Applications
asked 2026-04-26T07:41:03.45+00:00
SteveD 310 Reputation points
commented 2026-04-27T04:06:06.38+00:00
SteveD 310 Reputation points
2 answers

Word dollar blue no hightlight

Hello from Steve I need the below please dollar blue no hightlight Sub Dollar_Dollar_Blue_No_Highlight2() Selection.Find.ClearFormatting Selection.Find.Font.Size = 12 With Selection.Find .Text = "$" .Replacement.Text =…

Developer technologies | Visual Basic for Applications
asked 2026-04-23T21:35:23.1266667+00:00
SteveD 310 Reputation points
commented 2026-04-24T05:11:14.0966667+00:00
SteveD 310 Reputation points
2 answers

Word Color Red and Highlight Yellow

Hello from Steve I would like to please have the below script Color Red and Highlight Yellow Sub Dollar_Colour_Red_Bold() Options.DefaultHighlightColorIndex = wdYellow With Selection.Find .ClearFormatting .Font.Size = 12 .Text =…

Developer technologies | Visual Basic for Applications
asked 2026-04-21T19:41:00.22+00:00
SteveD 310 Reputation points
commented 2026-04-23T19:15:52.5366667+00:00
SteveD 310 Reputation points
2 answers

vba: Find and replace only one.

Hello from Steve Find and replace on a single find. VBA Sub AddZeroBeforeThreeDigits() With Selection.Find .ClearFormatting .Replacement.ClearFormatting ' Find any 3-digit number as a group .Text =…

Developer technologies | Visual Basic for Applications
asked 2026-04-19T21:41:35.2+00:00
SteveD 310 Reputation points
commented 2026-04-23T02:41:03.7066667+00:00
Taki Ly (WICLOUD CORPORATION) 1,020 Reputation points Microsoft External Staff Moderator
2 answers

trying to open a document in Word VBA using Document.Open command, command failed

got runtime error 4198, command failed; filename and path much less that 219 character limit

Developer technologies | Visual Basic for Applications
asked 2026-04-20T17:39:31.27+00:00
Edward Evans 40 Reputation points
commented 2026-04-23T02:21:18.9766667+00:00
Leon Tran (WICLOUD CORPORATION) 1,740 Reputation points Microsoft External Staff Moderator
1 answer

Word if not found then

Hello from Steve Objective if not found then move to next Sub Moving_Numerals() Application.ScreenUpdating = False Do Selection.Find.ClearFormatting Selection.Find.Font.Size = 12 With Selection.Find .Text = "|" .Replacement.Text =…

Developer technologies | Visual Basic for Applications
asked 2026-03-25T20:11:02.0266667+00:00
SteveD 310 Reputation points
commented 2026-04-22T09:06:27.01+00:00
Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 2,115 Reputation points Microsoft External Staff