Retrieving Data from Data Store

I have a great little Copy Paste Macro that Roy Cox wrote for me and need to take it to the next level.  Currently, the data on WS Input is transferred to WS Data Store.

What I need is for the text box, within the Shape (i.e. the button on the Input_Screen WS), to change to "Retrieve Initial Case" and if pushed again, RETRIEVES the data from the Data_Store (i.e. RangeName: Case0) and replace the appropriate cells in the Input_Screen.

That's it!

Thank you in Advance!

B.
Retrieve-Data-Copy.xlsm
Bright01Asked:
Who is Participating?
 
Roy CoxConnect With a Mentor Group Finance ManagerCommented:
I've added some explanations in the code.
Retrieve-Data-Copy.xlsm
0
 
Roy CoxGroup Finance ManagerCommented:
Have you tried reversing my previous code? I'll take a look now
0
 
Roy CoxGroup Finance ManagerCommented:
Is this right?
Retrieve-Data-Copy.xlsm
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Bright01Author Commented:
Roy,  Spot on.  However, what I was also trying to do is have the button change Text to reflect the status (i.e. if the Initial Case was stored, the Retrieve Initial Case would be displayed.  Pressing the same button, the Initial Case would restore from the Data WS and the Text would reflect again, the "Store Initial Case" in the button box.  That way there would be one button that would control the proper flow of data.

B.
0
 
Roy CoxGroup Finance ManagerCommented:
No problem. I have to leave work now. I'll soon amend this when I get home.

I'll combine both lots of code tow work from the same button dependent on text
1
 
Roy CoxGroup Finance ManagerCommented:
I've amended the code to work according to  the text in the shape.

I've also added code to clear the specific range each time.

I'll be calling it a day soon, but I'll make any amendments required in the morning.
Retrieve-Data-Copy.xlsm
0
 
Bright01Author Commented:
Roy, this is very good!   I would like to play with this tonight and tweek it for scaling.  I'll send you a reply in the morning.  Can you tell me what this statement does?

With Inputsht1.range ("Case Initial")

through

End With

B.
0
 
Roy CoxGroup Finance ManagerCommented:
I'll go through the code and add mpre notes now I have a little more time.
0
 
Bright01Author Commented:
Roy,

After playing with this for several hours to get the feel and logic of the code in order to scale it..... success!  You are definitely making me a better designer and coder.  You are a master.  Thank you  for the help.  Just the way to start the morning.  

I will be refining another question soon.  Hope you will pick it up.  My model is starting to "rock"!

Thanks again,

B.
0
 
Roy CoxGroup Finance ManagerCommented:
Message me when you post again. I like following a project through
0
 
Bright01Author Commented:
Roy,  About to send another Post.  I have added additional rows to the original Range.  HOWEVER, the new challenge is that I have other cells that are not in the same column  that also need to be mapped into the Data_Store.

Hope you will take a look.


B.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.