How do you create a macro on a worksheet that opens a dialog box?

How do you create a macro on a worksheet that opens a 
dialog box? 

0
anonymous (74722)
11/19/2003 9:49:49 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
580 Views

Similar Articles

[PageSpeed] 12

It depends on the dialog box.

If you want to show an inbuilt excel dialog box then:

dlgAnswer = Application.Dialogs(xlDialogOpen).Show

will show the FileOpen dialog box. Search help for the other built in dialog
boxes to replace xlDialogOpen.

If you want to get simple information from the user you could use InputBox.

Otherwise you can design your own forms to show to the user by inserting a
UserForm in the Visual Basic Editor and using the MyFormName.show in your
macro.

Neal
"Mark" <anonymous@discussions.microsoft.com> wrote in message
news:09cf01c3ae82$78f6af40$a401280a@phx.gbl...
> How do you create a macro on a worksheet that opens a
> dialog box?
>


0
neal1238 (7)
11/19/2003 2:37:39 PM
Reply:

Similar Artilces:

Excel Opens Without Displaying Workbook
Hi I got a problem with excel, one guy here, has excel 2003 and 2007 installed on his computer. When he tried to open myfile.xlsx it opens microsoft excel 2k7, but do not open the workbook ?? Does somebody know something about that ?? Thanks I haven't had to do this in xl2007, but I'd do this in xl2003: Tools|Options|General|Ignore other applications (uncheck it) In xl2007, it's hidden under: Office Button|Excel Options|Advanced Category|General section Uncheck "ignore other applications that use dynamic data exchange (DDE)" --- or --- Then reregister excel with t...

Fire a macro
Any idea how to have fetch file automatically fetch the data at say; 7:30 AM every weekday? Right now I have to push a button but may not always be here throughout the day to do it and I would hate to miss a day’s worth of data or more if I happen to be on vacation. I normally press a button in cell A1 of the sheet to activate this macro. -- Thank you! Doug, You could do that with application.ontime privideing the workbook was open of course. This bit of code to get things started Private Sub Workbook_Open() Application.OnTime TimeValue("07:30:00"), "YourM...

Help! How to create "fake" accounts in Money?
Here's my problem: I have a system of money management in which all income is split up and distributed into certain (fake) "accounts". (In reality, most of it is split up and distributed to an actual checking account and savings account.) Each of these fake accounts represent the balance that I have available to apply to certain aspects in life (e.g. bills/necessities, play, saving for spending, saving for investment, donations/tithing, education). So, for any actual deposit into my checking or savings account, I want to specify a certain amount OR percentage to go i...

Open Office #3
I have several OpenOffice.org files that I would like to open in Excel since we no longer use OpenOffice. Is there a converter somewhere? Hi The converter is OpenOffice. Choose "excel" as filetype in its SaveAs menu. As far as I know there is no easier way, but if you know how to program OpenOffice macros then it should be pretty painless. HTH. Best wishes Harald "Scott" <Scott@discussions.microsoft.com> skrev i melding news:7EBFC106-3E61-4211-9C66-92F29983D5D1@microsoft.com... > I have several OpenOffice.org files that I would like to open in Excel since >...

my documents open in WordPad, not their native program
When opening some of my documents, from a desktop shortcut, or "open recent documents", the document opens in WordPad, regardless of whether they were created with Publisher, Word, etc. Everything is fine if I open the doc through the native program, however. I am running XP Home SP2 and Outlook 2003 Small Business Edition. Look at the properties of the documents, see what opens them. Right-click any Office file, properties, opens with. If the correct application isn't used, click change. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news:...

More Problems with List Box
Hi Having some problems running a report with a list box selection. Below is the code I am using. The code should create a criteria (in the field Seperator) to run a report based upon a query, however this is not happening. If I enter the criteria directly into the query and then run the query it works fine, so it would appear the criteria is not being passed to the query. The problem is the report runs and shows all records from the table regardless of the selection in the list box Private Sub cmdRunReport_Click() Dim varItem As Variant Dim strCriteria As String Dim strAss...

Macro warning box opens twice
I'm running Excel 97 on a new p4 machine running XP SP1 Home edition. Just recently my workbooks that contain my macros have been "double pumping" the "the workbook you are opening contains macros" warning box. It appears when you first open the file from the desktop without Excel being open. The "MS Excel 97" product ID shows on a blank gray screen like normal, I select "Enable Macros" and there is a blink, then I get another macro warning box. I click "Enable Macros" and the workbook opens as usual. It does not occur if Excel is already o...

Task Duration Changes on SAVE & OPEN in XML format
Hi, We have discovered a strange problem in MSProject after installing SP2 The task duration changes when MPP file is saved as XML and XML file is reopened. This is causing a havoc. There is nothing specific about the file. File with even one task shows the problem. Any help possible. Can I upload the file somehwere? Hi, I'm running Project 2007 SP2. I created 7 tasks with durations from 1d to 7d and linked them. Saved to xml. Closed. Create new project from xml file and finish date of 7th task was same and all durations same. What's the minimum you have to...

Last Cell of Worksheet
The shortcut CTRL+END is very handy for moving to the last cell on the worksheet, in the bottom-most used row of the rightmost used column. This shortcut works until I delete rows at the end of the worksheet. After I delete a few rows, the CTRL+END shortcut takes me to the last cell that used to hold data, not the last cell that contains data. Is there a shortcut that moves to the last cell on the worksheet that contains data? If not, is there a way to change what Excel thinks is the last cell so that the CTRL+END shortcut takes me to the last cell that contains data? Thanks in adva...

how do I create a line graph for part of the periods?
I want to put two line graphs on one chart but each line is for a subset of the periods. Harold - Set up the data like this: Srs A Srs B a 1 b 2 c 3 d 4 4 e 5 f 6 g 7 and Series A will cover a-d and Series B will cover d-g. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Harold Rostoker wrote: > I want to put two line graphs on one chart but each line is for a subset of > the periods. ...

Excel macros should be able to record pauses, thread.sleep(23489)
Am doing research at a university where playback of users actions in Excel is useful. This is provided in large part by macros, however, I think it would be useful if there was a feature that allowed for recording of real-time use (i.e. recording of pauses that the user makes). This would be easy enough to do if there were a timer running in the background and the time between user interactions was put in the macro as sleep(time) commands for the macro thread. I haven't as yet seen any function in Excel that can do this? If there is, then please reply! ---------------- This post i...

making a macro run first thing when opening a workbook
is there a way to make a macro run right away when you open a workbook???? Hi either name your macro Auto_Open() or place your code in the workbook_open event -- Regards Frank Kabel Frankfurt, Germany Dennis Schuessler wrote: > is there a way to make a macro run right away when you > open a workbook???? ...

Help with Coding about linked worksheet
I have a worksheet contains data, this data if for reasons I ente number ( 1 ) in a specific cells it will give the symbol ( *1 ) and th cell will turn to red color and if I enter the number ( 2 ) it wil give ( *2 ) and the cell will turn to blue color and so on for a tota of four different symbols and colors, And because of the limitation of the conditional formatting to onl three I�m using a code. Thanks, with the help of some guys in this site I got this cod working Private Sub Worksheet_Change(ByVal Target As Range) Set cRange = Intersect(Range("y11:y35"), Range(Target(1).Addr...

Macros keep disappearing
Hi: I'm working on a .csv file and have written a macro for it. The macro works fine but when I go to re-open the file (after saving it first), the macro is no longer there. Is this something to do with it being a .csv file or what?? I keep having to re-enyter it each time I re-open the file, which is annoying. Thanks for any help! "OzBushDude" <OzBushDude@discussions.microsoft.com> wrote in message news:A92E6ACD-7953-4120-A5CB-FDC38E27054A@microsoft.com... > Hi: I'm working on a .csv file and have written a macro for it. The macro > works fine but when I g...

Custom combo box prompting
I have a table of key words which is three levels in separate columns. I want the user to be able to type characters into the combo box and as each character is typed to match on the letters of any of the three columns e.g. KW1=Software KW2=Office KW3=Word KW1=Software KW2=Office KW3=Outlook KW1=Software KW2=Windows If the user types 'O', I want the first two records to appear If the user types 'W', I want the first and third records to appear If the user types 'WO', I want the first record to appear If the user types 'S', I want all three records to appea...

have to print all info contained in excel properties dialog box .
I HAVE MANY VERSIONS OF EXCEL WORKSHEETS & WORKBOOKS DOCUMENTS SAVED ON MY COMPUTER. THEY ARE ALL VERY SIMILAR IN NATURE AND EACH WK SHEET & WK.BK. HAVE TOO MUCH SIMILAR DATA FOR A VISUAL SIDE BY SIDE COMPARISON. I NEED TO COMPARE USING THE DATA CONTAINED WITHIN THE PROPERTIES BOX FOR EACH WK.SHEET OR WK. BK. TO FIND THE CORRECT VERSION I NEED. I HAVE TO BE ABLE TO PRINT ALL THE INFO IN THE INDIVIDUAL DOCUMENT PROPERTIES DIALOG BOX. SIZE, DATE CREATED, ETC Please turn off the CAPS LOCK!! Makes it hard to read and is considered as SHOUTING! I would stick all workbooks into one F...

Excel Macro Warning
If I create a spread sheet with a macro and save it, the next time I open it, I get a macro warning window that allows me to cancel, disable macros, or enable macros. Now if I delete all the macros on that sheet and resave the workbook (Office 2000) and then reopen the file, I still get the macro warning even though the file no longer has any marros. Is there any way of getting rid of the warning since the sheet no longer needs the warning? -- Ted Remove "spam" from address to email me. delete the empty module regards Bill K "Ted Lind" <ted.lind@spamattbi.com>...

Suppress Disable/Enable Macro Pop-Up Window
Is it possible to have the Disable/Enable Macro Pop-Up Window default to Enable and not appear? Thanks for any help! Hi no. Only possible if you set the security level to 'Low' and I would strongly recommend not doing this "CM" wrote: > Is it possible to have the Disable/Enable Macro Pop-Up Window default to > Enable and not appear? > > Thanks for any help! CM See one more suggestion at your first posting. Gord Dibben Excel MVP On Fri, 29 Oct 2004 04:12:02 -0700, "CM" <CM@discussions.microsoft.com> wrote: >Is it possible to have the...

creating readable barcodes
I want to create readable barcodes for retail items with no manufacturer UPC. Ideally, I would like to create an alpha-numeric code. I have selected the 128A barcode format in the RMS new item wizard. The printed tag looks great, but the scanner can't read the code. I have tried codes of various lengths, none seem to be readable under 128A. Is the barcode format my problem or is there more to this? Jordan, If using 128A, make sure your ILC uses upper case letters. 128B supports both upper and lower case letters. 128C is numbers only. http://tinyurl.com/9hg3g Modify your lab...

Excell freezez after many macro cycles.
I have a macro that screen scrapes then filters the data and strutures it. The first 100 web pages run quickly but by 130 its slow and by 190 it is frozen and i have to pull a saved file. Even opening a progressively saved file is not possible. Thanks in advance. -- Vector ------------------------------------------------------------------------ Vector's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30258 View this thread: http://www.excelforum.com/showthread.php?threadid=500041 ...

Can't open new tab i IE 8
Hi... i Have tryed to fin a correct solution for the probelm. but havent seen one i here yet... so i try again. When i'm clicking a link that should opne in a new tab ore om right clicking and click open i new tab. nothing happens. anyone got at clue Regards Jimmy ...

Form Combo Box
I have a form with a combo box lookup. Besides bring back the lookup field, how can I bring back a 2nd field from the lookup table to the record in the form Define the combo box control as having 2 or more columns. Include the extra columns in the query feeding the combo box. Use the .column syntax to refer to the extra column(s) (look in Access help for details) -Dorian "hcz" wrote: > I have a form with a combo box lookup. Besides bring back the lookup field, > how can I bring back a 2nd field from the lookup table to the record in the > form Thank you but I have...

Help! with code to open word
I need to write a macro that opens up word & copies a selection from the excel file into the new word document pasted as "Picture (enhanced metafile)" I am currently using excel 2003 Something like this should get you started: Sub copyRangeToWord() Dim gobjWordApp As Object Dim wdPasteMetafilePicture As Integer Dim wdInLine As Integer ' Imitate Word constants wdPasteMetafilePicture = 3 wdInLine = 0 ' Create new Word session with a new, empty document Set gobjWordApp = CreateObject("Word.Application") gobjWordApp.Documents.Add go...

Destroy VBA code within a macro
Hello I wonder if somebody know a way to delete some macros/code from within a macro when a trial period has expired, so that the VBAProject is useless after that period. I already have the trial period implemented, but want to enforce the users to ask for a news version. Thank you for your help OMER OMER See Chip Pearson's site for a timebomb workbook. http://www.cpearson.com/excel/workbooktimebomb.aspx Read carefully the caveats at the beginning and alternatives to VBA Gord Dibben MS Excel MVP On Tue, 24 Nov 2009 10:28:02 -0800, OMER <OMER@discussions.mi...

Macro to grab email address and open Outlook
Hi there I am trying to write a simple macro to be able to send an email based on an emai address in a form. tblAgency Details has a field EmailAddress (data type is text) I have a Command Button on a form frmAdd Agency Details to run a macro. Macro name is SendEmail - Action is only SendObject There are only two items in the Action Arguments To: =[EmailAddress] Edit Message: Yes (I only want Outlook to load with the email address) So far it does not work. When I have a field for a Web Address and the data type is a hyperlink that works well for me...