Avatar of Bright01
Bright01Flag for United States of America

asked on 

Need help with Clear Macro

EE Pros,

I've worked to build out (with the help of EE) a simple routine that I need a simple fix for.  Attached you will find a WB that has 2 WSs and a Form.  

Here's the ask.  I'm having difficulty with the "Clear" macro.  I have a range name that accommodates the clear when the macro is fired so that all the rows are cleared.  What it doesn't do is reset the row level of the table back to say 2 rows.  So.... when you add a record with the Add Record macro, it simply continues down the table instead of starting over.

Any help would be appreciated.

B.
Adding-Records-to-a-Table-Macro.xlsm
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Bright01
SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Bright01
Bright01
Flag of United States of America image

ASKER

Ryan and Regonzo,

Thanks for the quick reply.  Ryan, you both answered the question.  Regonzo, your answer was more complete since you found something else that needed changing.  With that said I have two quick questions;

1.) I've modified the code so that when you clear say "yes" to another record, it completely clears the ComboBoxes.  What I don't understand is how you load the Combo Boxes so the lists are still in play.

and

2.) Can you write a line of code that when you successfully add a record, instead of having to click on the acknowledgement, it simply hangs for 1 second and then moves to the question about adding another record?

Thank you guys!

B.
Adding-Records-to-a-Table-Macro.xlsm
Avatar of Bright01
Bright01
Flag of United States of America image

ASKER

Ryan and Regonzo,

 Thanks for the quick reply.  Ryan, you both answered the question.  Regonzo, your answer was more complete since you found something else that needed changing.  Thanks guys.  Posting a follow on question if you are up for it.

Best regards,

B.
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo