Saving A Selection Of Excel And Counting How Many Times It I

Morrissey

Board Regular
Joined
Mar 8, 2002
Messages
85
Hi Everyone I've Got Yet Another Problem Which I Need Your Help With I Need The Macro Code For

When I Click A Button I Would Like Excel To

1. Copy And Paste A Selection I have Made (It's Called 'export1') On To Another Template I Have Made (C:IFSInvoice Template.Xlt)

2. Save That

3. When That Button Is Pressed Record How Many Times It Is Done (I Want 250 Times) And Have A Message Coming Up.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
can`t you just fill a cell with value 0 and include a function to add 1 to that value everytime the export occurs.

Secondly include an evaluation of the cell value.When>250 let a msgbox appear.

?
 
Upvote 0
yes well can someone who is willing to help me and doesn't believe in sport of learning VBA please help
 
Upvote 0
I will suggest only the 3rd question
1. put this before doing Process
StartTime = Timer
2. Put This After doing Process
EndTime = Timer
3. put This in Module

Dim StartTime, EndTime As Date
MsgBox "Finish ! Using Time " & Format(EndTime - StartTime, "0") & " Second", vbExclamation + vbOKOnly, "Remark"
 
Upvote 0
Run something like this in the same sub as your export macro.

Worksheets("sheet1").Range("a10").Value = a10 + 1

And then something like this: in another sub:

if a10.value >250 then
MsgBox "big boy, you did it 250 times!", vbExclamation, "big boy"
end if
This message was edited by Dinictus on 2002-03-21 03:39
 
Upvote 0
If only you could get a wav. file to say that instead of a message box eh? You'd be the envy of the office
This message was edited by Audiojoe on 2002-03-21 03:17
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,178
Members
448,871
Latest member
hengshankouniuniu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top