![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
Hello I have A Problem And I Need A Solution Quickly, I Have A Button Which When Clicked I Want To Do The Follwoing Things
->Copy A Selection Of My Cells from 'A1' to 'G49' (I Have Also Named These cells a range called 'export1' Onto A New Workbook ->Have This New Workbook Automatically Saved While And Then Have To Workbook Closed When This Has Been Done 250 Times I Would Like A Message Box To Come Up Saying A Customised Message I Need All The VB Code For This Please Help Me! |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
come on someone must know this is very important
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Maybe you can adapt some of the suggestions here to suit your needs:
http://www.mrexcel.com/board/viewtop...rum=2&start=10 HTH |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
Hi yes I've Seen That It's Where I Got My Idea However I Want The Range I Have Copied Over To A New Work Sheet (So That No Macros Are On The New Workbook) I See You Know About VBA So Could You Help Me With This Please?
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
I'll try to help. Let me get this straight.
You have a workbook that is going to contain the VBA. You have a range of values that are going to be copied a pasted into a new workbook. Now, is there going to be a new workbook created each time the copy and paste action is carried out? Or are we copying and pasting to the same workbook each time? You then want this new workbook closed and saved. After the copy and paste has occured 250 times, you want a message box to be thrown up. Is this an accurate description of what you want? The reason I ask is that I've answered some questions by people on this board and when I provide the solution they ask for, the criteria suddenly changes. (stupid A Level students are particularly bad for this) |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
Ok I will make The Workbook It's Going To Be Pasted On A Template Lets' Say Its Called Invoice Template 2 I Want My Range ('Export1') Pasted To The Template (So That all The Macros I Have On The Other Template Are Not There) And When This Is Done 250 Times I Want A Message To Come Up I Hope That Helps
|
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Quote:
The workbook will be called ""Invoice Template 2.xls" Is there any particular sheet or range you want these values to be copied to in the template? Or is he sheet in the new work book going to be called Actually this doesn't matter I'm just going to be using my own range and my won workbooks for now. You say "When This Is Done 250" you want a message box to get thrown up. Are you talking about pasting the data 250 times here? |
|
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
No When The Button Is Pressed 250 Times THe Range I Want Is Called 'Expot1' Or A1 To G49
|
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
OK, last question, I think. Is the template workbook going to be open or closed before the button is pressed?
|
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Mar 2002
Posts: 85
|
closed
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|