JonWhite123
New Member
- Joined
- Dec 3, 2008
- Messages
- 8
Hello everyone,
I hate to start a new post so many apologies if the answer is there and I've missed it, but...
I need a little help with understanding the best way to code something. I have a spreadsheet with about 30 or so columns on it. My code at the moment references the columns directly as "F" or whatever column I want to look at. Sometimes I filter them, sometimes I delete them. This is all fine until a user of the spreadsheet deletes, or otherwise moves columns around. It's my own fault as I've not been coding long, and kinda rushed straight into it - but I now need to put it right....
Some research I've done says to declare everything in a seperate module as Public Const [variablename] = "F" or something similar. Is this the best way to do it? If so how do I get this module to run and remember the column references across 2 or more modules?
Sometimes i need to reference the column as "F" and other times (like when deleting column ranges) it needs to be F - I guess this would simply be 2 declerations?
Thanks in advance for any help. I just want to check with you clever people so I only have to get this right once!
I hate to start a new post so many apologies if the answer is there and I've missed it, but...
I need a little help with understanding the best way to code something. I have a spreadsheet with about 30 or so columns on it. My code at the moment references the columns directly as "F" or whatever column I want to look at. Sometimes I filter them, sometimes I delete them. This is all fine until a user of the spreadsheet deletes, or otherwise moves columns around. It's my own fault as I've not been coding long, and kinda rushed straight into it - but I now need to put it right....
Some research I've done says to declare everything in a seperate module as Public Const [variablename] = "F" or something similar. Is this the best way to do it? If so how do I get this module to run and remember the column references across 2 or more modules?
Sometimes i need to reference the column as "F" and other times (like when deleting column ranges) it needs to be F - I guess this would simply be 2 declerations?
Thanks in advance for any help. I just want to check with you clever people so I only have to get this right once!