Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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/
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro match function problem Asraf Excel Discussion (Misc queries) 12 May 7th 10 05:25 PM
Excel Save-AS Problem Charles Barnum Excel Discussion (Misc queries) 0 February 12th 07 04:17 AM
Excel save as problem Gabor Excel Discussion (Misc queries) 3 February 23rd 06 04:35 PM
'Save As' function / macro jpi_chicago Excel Programming 4 June 28th 04 10:42 PM
Excel VBA- Trend Function in Macro Problem ksutton79 Excel Programming 0 April 1st 04 02:02 AM


All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"