View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 576
Default force upate to datbase using save as

Jason,

My ouch... should be

Sub saver()
ActiveWorkbook.Save
End Sub

You don't need the "= True" on the end.

If you had used
ActiveWorkbook.Close = True
than you need the = True.
Change it to False and you close without saving.

steve

Try recording a macro and see if that works.
"Jason" <jht@oneboxdotcom wrote in message
...
Thanks steve, but that returned a compile error -
expected function or variable, and the .save = is
highlighted.

Here is some more detail:
using excel 2000. I used template wizard to create a
user input spreadsheet. Each new record needs a
sequential number assigned. The list/database holds all
of the info for all the records, but each record is also
saved as its own file. Creating and updating an
individual record needs to update the list/database.

the workflow is:
-open the template for a new blank input sheet.
-clicks the first button to find the last record in the
database add 1, paste the number in the input sheet
-click second button and the worksheet is saved as the
number from the previous step
-enter data unique to the record
-click a button to update the list/database ***not
working***
-email the the spreadsheet with the unique data to a
responsible party (or email a link to the file on the
server)
-responsible party adds info, then clicks a button to
save to the orig. file and updtae the database (not
implemented yet).

Like I said before using the save button from the std
toolbar causes the database update window to open, but
coded saves do not.

Thanks again for any suggestions.
Jason
-----Original Message-----
Jason,

Put this code into a standard module and customize your

button and assign
this macro.

Sub saver()
ActiveWorkbook.Save = True
End Sub

"jason" <jht@onebox wrote in message
...
I am still looking for this answer. I have found info

on
forms, but still can't get the darn thing to update.

I am obviously inexperienced with programming, so I

would
even take a hint at how to make a custom button act
exactly the same as the std toolbar save button.

Anyway thanks again.
Jason
-----Original Message-----
I am trying to implement a button on a form (used
template wizard to link form to an excel

list/database)
that will both save as "myfilename" and also force
the "create new record". So far, I can get it to

save,
but the only way it will pop up the "template file -
save
to database" input is by using the standard toolbar

save
button. A save or save as macro will not bring up the
box.

I would also like it to pick the "create new record"
radio button, and click the "ok" box.

Is there a way to do this?

If not is there a way to make my button act exactly

like
the standard toolbar button?

btw- I created a macro by clicking the std save

toolbar
button, but it does not act the same, ie, I get no
update
database.

tia
jason
.



.