Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!
Excel VB programming question - skipping cells that lack a certain property
It's been a long time since I programmed anything or messed with VB. I've googled my problem and narrowed it down, but I'd still like some help if anyone here knows their stuff!
What I have is an Excel spreadsheet that someone has put a lot of text into the data validation input messages (the text that pops up when you click a cell). I would like to extract the input messages and put them into cells for easier editing. In its simplest form, what I want to do is this:
This works just fine if an input message has been defined. But if a cell has no input message, I get a "Run-time error '1004': application-defined or object-defined error." I'm trying to access a property that isn't simply null, it just doesn't exist at all.
What code can I use to check whether .Validation.InputMessage exists, and if so, copy it to a cell?
If you want to be really nice, I'm also doing it in a loop straight down the column and haven't looked up the best way to do that yet.