Edit: Most responses so far involve checking for possibly non-existent objects, which outright does not work in VBA with Option Explicit on (it throws a compile-time error, so On Error doesn't work, and turning off Option Explicit is not an option). Is there some other roundabout / out-of-the-box way to...
I am working on an legacy VBA/Excel app and stumbled over some lines of code where a long string (read from a file) is cut into pieces. Those lines look like this:
Problem StatementIn VBA, three main kinds of date time controls can be used provided certain ocxs have been registered using administrator rights. These are VB6 controls and are not native to VBA environment. To install the Montview Control and Datetime Picker, we need to set a reference to Microsoft MonthView...
Unlike in VB6, there exists no native calendar widget in VBA. The only widgets I can find are very environment-dependent; they require registering mscal.ocx or mscomct2.ocx and so only work with 32-bit versions of Office.
I am relatively new to VBA. I am trying to write a code for nested IFs in VBA. I have the following code, yet the output is wrong. How can I make the nested if function work?
the following numbers begin in cell B5: 23 34 45 56 45 54 I want to sum the first digit of each, and display the result in cell C9
i'm trying to write a test module to test one of the modules I wrote in VBA. In specific, I have a if statement I would like to trigger using the test module by giving the module/funtion the wrong initial parameters. The module/function I would like to test is:
I want to have a catalog of constant materials so I can use code that looks like the following:Obviously the density and symbol for aluminum are not expected to change so I want these to be constants but I like the dot notation for simplicity.
I have an Excel Sheet with about 4500 checkboxes (I know, it sounds stupid, but it is for a customer, please do not ask...). Just wrote the VBA Sub below to uncheck all the boxes together. So far it works, but it is terribly slow, it takes more than 5...
Often times it's required that you go through a range of cells, and based on some criteria, delete an entire row.