Charliebear:
1) You'll find that un-requested files are not usually downloaded by our moderators or experts for various reasons.
2) Requests for "final code" without showing your efforts are often ignored. (Please see the FAQ section)
SO, what to do?
If you have your code ({alt}{F11} will open the VBA editor) copy and paste it here, then select that pasted text and click on the
[CODE/] formatting option in the toolbar.
Post a
small example of your data
Use the
[CODE/] formatting option in the toolbar to preserve the column formatting and spaces (not the tab key :) ) to space your columns.
Once we have that we can go from there.
Some tips:
Open any Office-word/excel/database>
<alt><F11> to open the VBA editor...
Menu>Tools>Options>
>Editor tab, UNCHECK "auto Syntax Check" you're vba code will still highlight if in error, just
no annoying message boxes while you type!
>CHECK the "Require Variable Declaration" option --- you will now have to use the
"DIM...variablename....typecaste" construct in your code. Highly advised.
Everything else on this tab check, I prefer the tab step to be either 2 or 4 spaces.
>The other tabs are good as is for most people, review if you want.
You may find this introductory tutorial site helpful:
www.homeandlearn.org>Excel VBA For Complete Beginners
PLEASE DO NOT DO THIS as suggested in the tutorial:
In order to run macros without any annoying security warnings, click on Macro Security, on the Code panel. Select the option for Enable all macros. Then make sure that "Trust access to the VBA object model" is checked:
Set the security to "Disable with Notification" - IMHO the "annoying security prompt" is better than opening some file from a friend or colleague that wipes out all of your hard work!
Thnx
-z