![]() |
![]() |
|
|||||||
| 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 |
|
New Member
Join Date: Mar 2002
Location: Rae Winn
Posts: 2
|
I have a workbook with a data entry sheet and product sheets. All data is entered in dataentry and then distributed to correct worksheet. My question is this: After data entry I want the active worksheet to be saved to a name I have provided in code(this works) but then I have a macro that I need to run to change info in the original worksheet (get cumalitive totals and wipe out data entry sheet). Where do I put macros so it runs properly?
I have a button that runs the 'save as' code but then the original workbook is not active and my 'savetotals' and 'clear dataentry' does not work.(all on same button) Any help will be appreciated! Great site, by the way. Rae Winn |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Feb 2002
Location: Brisbane, Down Under
Posts: 533
|
rwinn - before you saveas you need to include some code to capture your current workbook such as
ThisBook = ActiveWorkbook.Name once you saveas then reopen it in your macro as Workbooks.Open FileName:=(Thisbook) Quote:
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Location: Rae Winn
Posts: 2
|
What I decided to do is make two buttons- 1 that saves the current file, 'saves as' to specified file name, and reopens original book. 2 Calculates all cumalitives, clears dataentry and resaves the form so its ready for dataentry.
Yea, forgot to save the original form before going on this rollercoaster. Thanks for the help. Rae Winn |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|