Top "Vba" questions

Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the entire Office suite as well as other applications.

Excel VBA For Each Worksheet Loop

I am working on code to basically go through each sheet in my Workbook, and then update column widths. Below …

excel vba for-loop each worksheet
VBA equivalent to Excel's mod function

Is there a vba equivalent to excel's mod function?

excel excel-2007 vba
Protecting cells in Excel but allow these to be modified by VBA script

I am using Excel where certain fields are allowed for user input and other cells are to be protected. I …

vba excel
Closing a Userform with Unload Me doesn't work

I need to close an Excel userform using VBA when a user has clicked a submit button and operations have …

vba excel excel-2010
Rounding a number to the nearest 5 or 10 or X

Given numbers like 499, 73433, 2348 what VBA can I use to round to the nearest 5 or 10? or an arbitrary number? By 5: 499 -&…

vba rounding
Access VBA | How to replace parts of a string with another string

I am trying to create a piece of code that replaces one word with another. Example: Replace Avenue with Ave …

ms-access vba
Filter Excel pivot table using VBA

I have tried copying and pasting solutions from the internet forever now to try to filter a pivot table in …

excel filter pivot-table vba
Now() function with time trim

So the function =Now()....is there a way I can use this and only get the date, not the time? …

ms-access ms-access-2007 vba ms-access-2003
Timing Delays in VBA

I would like a 1 second delay in my code. Below is the code I am trying to make this delay. …

vba timer wait pause timedelay
How can I color dots in a xy scatterplot according to column value?

Consider the following worksheet: A B C D 1 COMPANY XVALUE YVALUE GROUP 2 Apple 45 35 red 3 Xerox 45 38 red 4 KMart 63 50 orange 5 Exxon 53 59 green …

vba excel charts excel-formula