tagged [vba]
Hiding an Excel worksheet with VBA
Hiding an Excel worksheet with VBA I have an Excel spreadsheet with three sheets. One of the sheets contains formulas for one of the other sheets. Is there a programmatic way to hide the sheet which c...
How do I express "if value is not empty" in the VBA language?
How do I express "if value is not empty" in the VBA language? How do I express the condition "if value is not empty" in the VBA language? Is it something like this?
Check if value exists in column in VBA
Check if value exists in column in VBA I have a column of numbers of over 500 rows. I need to use VBA to check if variable X matches any of the values in the column. Can someone please help me?
Exit a while loop in VBS/VBA
Exit a while loop in VBS/VBA Is there a method of exiting/breaking a `while` in VBS/VBA? Following code won't work as intended: ``` num = 0 while (num
Is it possible to declare a public variable in vba and assign a default value?
Is it possible to declare a public variable in vba and assign a default value? I want to do this but it won't compile: What's the best way of achieving this?
- Modified
- 2 Apr at 18:9
Excel VBA - select multiple columns not in sequential order
Excel VBA - select multiple columns not in sequential order I would like to select columns. Eg. I want to `select column a, b, d, e, g, h` I've tried: I get message: `Type mismatch`.
How do I find the last column with data?
How do I find the last column with data? I've found this method for finding the last data containing row in a sheet: Is there a similar method for finding the last data containing column in a sheet?
Set background colour of cell to RGB value of data in cell
Set background colour of cell to RGB value of data in cell I have a column containing RGB values, e.g.: In Excel, is there any way I can use this to set the background colour of the cell?
How to check for Is Not Null in VBA?
How to check for Is Not Null in VBA? Hi I have the following expression. I'm trying to say "if the second field Is Not Null". Can you help. Thanks
Determining whether an object is a member of a collection in VBA
Determining whether an object is a member of a collection in VBA How do I determine whether an object is a member of a collection in VBA? Specifically, I need to find out whether a table definition is...
- Modified
- 1 Jul at 07:23
How to return a result from a VBA function
How to return a result from a VBA function How do I return a result from a function? For example: This gives a compile error. How do I make this function return an integer?
- Modified
- 1 May at 22:55
Open an html page in default browser with VBA?
Open an html page in default browser with VBA? How do I open an HTML page in the default browser with VBA? I know it's something like: But I think I have to reference the program which will open the p...
- Modified
- 2 Apr at 18:15
What is the difference between dim and set in vba
What is the difference between dim and set in vba Pardon me as am a newbie in VBA. Sometimes I use Other times I use What is the difference? And when should I use what?
How to refer to Excel objects in Access VBA?
How to refer to Excel objects in Access VBA? What declarations I have to make in order to be able to use Excel objects and constants from my Access 2007 VBA script? or or
- Modified
- 19 Apr at 15:50
Code to loop through all records in MS Access
Code to loop through all records in MS Access I need a code to loop through all the records in a table so I can extract some data. In addition to this, is it also possible to loop through filtered rec...
VBA Count cells in column containing specified value
VBA Count cells in column containing specified value I need to write a macro that searches a specified column and counts all the cells that contain a specified string, such as `"19/12/11" or "Green"` ...
Getting char from string at specified index
Getting char from string at specified index As stated how to get char from string at specified index in VBA (Visual Basic for Applications)? I searched Google and these do not work: `s(index)` , `s.Ch...
How to get the path of current worksheet in VBA?
How to get the path of current worksheet in VBA? I wrote a macro as an add-in, and I need to get the path of the current worksheet on which it is being executed. How do I do this? How do I get the fil...
Excel concatenation quotes
Excel concatenation quotes I'm trying to concatenate several fields and want certain fields to start and end with quotes ("....."). When I put a cell (B2) inside this, the cell (B2) is shown as plain ...
Rounding a number to the nearest 5 or 10 or X
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: By 10: etc.
Open Google Chrome from VBA/Excel
Open Google Chrome from VBA/Excel I'm trying to open a Chrome browser from VBA. I understand Chrome does not support ActiveX settings so I'm curious if theres any work-arounds?
- Modified
- 9 Jul at 19:34
Excel VBA code to copy a specific string to clipboard
Excel VBA code to copy a specific string to clipboard I'm trying to add a button to a spreadsheet that when clicked will copy a specific URL to my clipboard. I had a bit of knowledge of Excel VBA but ...
Open Excel file for reading with VBA without display
Open Excel file for reading with VBA without display I want to search through existing Excel files with a macro, but I don't want to display those files when they're opened by the code. Is there a way...
What does the keyword Set actually do in VBA?
What does the keyword Set actually do in VBA? Hopefully an easy question, but I'd quite like a technical answer to this! What's the difference between: and in VBA? I know that the latter will throw an...
- Modified
- 28 Dec at 08:34
What does <> mean?
What does mean? I have seen this before in SQL and VB, I am now reverse engineering an Excel speadsheet and have come across the following formula: I am converting it to ActionScript: but I am unsure ...