An implementation of Visual Basic that is built into Microsoft products.
1,624 questions with Developer technologies | Visual Basic for Applications tags
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
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
Rename Module
I want to rename a module in my VB project in Excel
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.
Listened to Co Pilot
Hello from Steve Now all I need please is to open Sub OpenForm2() Const strFolder As String = "C:\Tab Form\Input Stakes" Dim doc As Document With Application.FileDialog(FileDialogType:=1) ' 1 = msoFileDialogOpen .Filters.Clear …
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
Word script is not functioning.
Hell from Steve The below script is not functioning, What is required please Sub Rename_Trainers() Dim FindWords As Variant, ReplaceWords As Variant Dim i As Integer FindWords = Array("MCKAY HARRINGTO", "WALKER BERGERSO",…
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
Excel Delete the numerals
Hello from Steve The below works perfectly I would like please to take it to another step. At this time It has moved X0312 to the left cell Can it now delete X0312 Leaving Hephaestus Sub CopyNumbersOnly() Dim cell As Range, num As String, ch As String,…
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
Word find only Font 12
Hello from Steve How do I please only find font 12 Sub ReplaceMultipleNames() Dim FindWords As Variant, ReplaceWords As Variant Dim i As Integer FindWords = Array("WALKER BERGERSO", "Orange", "Banana") ReplaceWords =…
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
vba: Find/Replace digits and formatting That replacement text contains a group number that's out of range
Hello from Steve Objective is when three digits found put a zero in at the beginning. That replacement text contains a group number that's out of range Sub AddZeroBeforeThreeDigits() With Selection.Find .ClearFormatting …
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
In word if four numerals located add a zero at the beginning.
Hello from Steve How do I do in VBA the below please. In word if four numerals found add a zero at the beginning.
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
Find font 12
Hello from Steve Objectives replace with font 12 Sub AddZeroBeforeThreeDigits() With Selection.Find .ClearFormatting .Replacement.ClearFormatting .Text = "([0-9]{2})" .Replacement.Text = "000\1" .Forward =…
Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
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
An implementation of Visual Basic that is built into Microsoft products.