![]() |
Excel Macro - Save Function Problem
I have created an input file and corresponding database in excel. Sinc
I would like to use the input template as the only data entry point, attempted to create a macro that automatically populates the databas at the push of a button. The database population typically takes plac in 2 steps: step 1: save the input template file step 2: a dialog box appears and asks the user to choose whether t create a new database record or not. I used macro recorder to replicate these steps, however step 2 doesn' seem to work. When the dialog box from step two appears, the macr recording icon actually disappears, which makes me think that it's no actually being recorded. Now when using the new macro, the input file is saved, but the databas record is not added, nor do i receive a message asking whether i woul like to create a new record. i'm not fluent with vba, but this seems like it shouldn't be to difficult to fix... any ideas? Thanks -- Message posted from http://www.ExcelForum.com |
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/ | |
All times are GMT +1. The time now is 05:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com