Hi All, As my name suggests I am VERY new to this and finding my way through the world of VBA slowly and cautiously and could do with some help
I have a spreadsheet where the data in columns A-D are pasted in by the user, and some validation rules are then applied for the user to fix the data. After this they press a button to create a csv, but as each time they paste data in it could be a different number of rows I am using some code I found to ask the user to enter the range they want to export which is a little clumsy.
What I would like to happen is when the button is pressed, it works out how many rows there are and then this range is exported into the csv.
I have the saving of the csv file code all sorted (if a little clumsy), but I cant work out how to get the number of rows the user has entered and then add this into the csv creation mode.
I have looked at usedrange, but because I have formulas in cells to the right, this doesn't work
I tried a count if to esablish the number of rows (which does work) but I can;t then work out how to get this into the csv file generation code.
I had a quick look at current region, but can't figure out how how to position it with the other code (or if it will even work).
Any ideas would be greatly appreciated, the code I have got to so far is below (please don;t laugh too loudly)
![]()
Please Login or Register to view this content.
Bookmarks