View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Excel Macro - Save Function Problem

The macro recorder is extremely limited. At best it records the results of
what you do but it does not record how you do it. So if you had to click
through a hundred various warnings and confirmations to, say, save a file,
all that gets recorded is the result - a save.

i'm not fluent with vba


You're going to have to become more fluent to move beyond the recorder to do
useful things. For instance a good way to ask a Yes/No question is like
this:

If MsgBox("Clear data?", vbYesNo, "My Database") = vbYes Then
MsgBox "User clicked Yes"
Else
MsgBox "User clicked No"
End If

Check out MsgBox in on-line Help.

--
Jim Rech
Excel MVP

"Nasdax " wrote in message
...
|I have created an input file and corresponding database in excel. Since
| I would like to use the input template as the only data entry point, I
| attempted to create a macro that automatically populates the database
| at the push of a button. The database population typically takes place
| in 2 steps:
|
| step 1: save the input template file
| step 2: a dialog box appears and asks the user to choose whether to
| create a new database record or not.
|
| I used macro recorder to replicate these steps, however step 2 doesn't
| seem to work. When the dialog box from step two appears, the macro
| recording icon actually disappears, which makes me think that it's not
| actually being recorded.
|
| Now when using the new macro, the input file is saved, but the database
| record is not added, nor do i receive a message asking whether i would
| like to create a new record.
|
| i'm not fluent with vba, but this seems like it shouldn't be too
| difficult to fix... any ideas? Thanks!
|
|
| ---
| Message posted from http://www.ExcelForum.com/
|