Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
ebook!
Our Top 15 Excel Tutorials
Instant Access!
E-mail:
Subscribe for Free Excel tips & more!
E-mail:
Advertisements



Macros Waiting For User Input

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

I am trying to put together a macro that waits for the user to input data and then continue running the macro.

All user input is for one cell and I am looking at more of an entire sheet worth of data.

Here is the scenerio.

I have one tab that pulls data out of a sharepoint list. I then have another tab that I dump data from another database into and then use vlookups to compare the data.

The problem is I need it update the sharepoint list. Then wait for the user to dump in the new data from the external database before continuing the macro and working with the vlookups.

Currently I am working this by running a few different macros to do it all, but I would like to condense it down to running one macro.

Thanks for any input and help.

View Answers     

Similar Excel Tutorials

Make Users Enable Macros in Order to View a Workbook in Excel
Tutorial showing you how to make a user enable macros in a workbook in order to view the workbook. This is very im ...
Automatically Run a Macro When a Workbook is Opened
How to make a macro run automatically after a workbook is opened and before anything else happens. You need this m ...
How to Add a New Line to a Message Box (MsgBox) in Excel VBA Macros
I'll show you how to create a message box popup window in Excel that contains text on multiple lines.  This allows ...
Excel Data Validation - Limit What a User Can Enter into a Cell
Data Validation is a tool in Excel that you can use to limit what a user can enter into a cell.  It is a great too ...

Helpful Excel Macros

Add an Input Message to a Cell - Message Appears When the Cell is Selected in Excel - Data Validation Macro
- Add data validation input messages to cells in Excel with this free Excel macro. These messages appear when a specific
Add a Drop Down Menu to a Cell in Excel - Data Validation Macro
- Add a drop down menu or list to a cell in Excel with this free Excel macro. This is a great little macro that allows yo
Get Values from a Chart
- This macro will pull the values from a chart in excel and list those values on another spreadsheet. This will get the s
Sort Data that Doesn't Have Headers in Descending Order in Excel
- Sort data in Excel that doesn't have headers using a macro. This Excel macro assumes that your data set does not have a
Display the AutoFilter Criteria Applied to a Data Set in a Cell in Excel - UDF
- This free Excel UDF (user defined function) allows you display the filter criteria that has been applied to a data set i

Similar Topics







Macro Step 1: I have a macro that prompts the user to input requested data into a dialogue box.

Macro Step 2: The macro then takes the data and places it in specific cells.

Macro Step 3: Depending on the responses in step 1, the macro may prompt the user to input more requested data into a dialogue box.

Macro Step 4: If more data is prompted in step 3, the macro takes the additional data and places it in specific cells.

Question: Is there a way to write excel macro syntax code that interrupts the running of the macro (let's say after step 2) to alllow the user to view the cells were the macro placed the data. The macro would then ask if the user approves of the cell input. If user does not approve, the macro would interrupt itself and allow the user to make modifications to the cells. After the user makes any modifications, the user can resume the macro at the point in the macro where it was interrupted.


Hi,

I have a report in Excel which I have published in MOSS (Microsoft Office SharePoint Server). Now the problem is that I have lot of Excel Macros which need to run based on the user input. It works fine in Excel, however, I am not able to replicate the same onto the Sharepoint.

In Sharepoint the report is just available on a viewable basis with no interactivity for the user to view the data as he would like to.

My question is

Is it possible to make the Excel Macros work in SharePoint. In a nutshell, can Excel and SharePoint communicate with each other, without the user having to download the Excel file to make the changes?

If this is not possible, what are the other available alternatives. Can the Excel macros be programmed in some other language so that the report can be made dynamic?

Any suggestions are greatly appreciated.

Cheers,
Abhi


Hello,

I was wondering if there is a way and if so, if could anyone show me a simple code line how one could get user input while running XL macro ?

For example, I want to run a macro to insert data into certain cells and I want the user to be able to input the cell designation via keyboard.

Thanks for any suggestions !


I have a workbook with a couple of straightforward macros activated on buttons on a couple of different sheets.
Thanks to the penultimate knowledge on this board, I have been able to figure out how to store data and use this to create an "Undo" macro (sort of) that resets everything back to it's original condition. My question is:
If a user hits the "Reset" button, it will reset all their data back to the original. I want to want the usr with a popup message, and give hem the option of hitting "OK" or "Cancel". I can create a simple MsgBox popup, and I know how to create a UserForm, but I'm lost with:
A: Pausing the macro from running the rest of the script until after the user has hit OK. And/Or:
B: Having a User Form Popup to give the user the option of hitting Cancel to stop the macro from running without an error message, and just continuing with entering data into the spreadsheets normally.
Am I better off with a MsgBox or a UserForm, and how do I accomplish the OK or Cancel options and pause my script until input?
Thank you in advance for your help (Once again).


Well, here is what I am trying to do, and how I am going about doing it. I have a couple of questions. Maybe there is a better way of doing this.

I created a custom toolbar that currently has 7 macros on it. When the workbook opens, it automatically loads the toolbar. There are a couple of macros that I don't want everybody to be able to run. I have a worksheet that has some validation information in it. There is a list of user names with a column that basically states whether or not the user should have access to all macros.

What I planned to do was find the user that was running the macro. Look them up on the validation worksheet to see if they can run all macros. If not, then don't let them execute the macro (exit the macro).

How do I find the user trying to run the macro? The spreadsheet is not a shared spreadsheet. Only one user can be in it at a time. I was going to use...
ActiveWorkbook.UserStatus(1, 1)
However, is this the best thing to do? Is it really telling me who the user is that is running it?

Is there another way to prevent the user from running certain macros?

Thanks for the help.


Hey All,

Im working within a workbook that has two workseets called "Input" & "Status". I enter individual information within the "Input" sheet and select a macro embedded that filters all information from the "Input" sheet to the "Status" sheet. Once the macro is finished running it brings me back to the Input sheet for me to enter my next entry.

What I am trying to do is setup a sort macro on the input sheet that will allow users to select 1 sort option from a dropdown list in cell $c$29. Once the user has selected a sort option I would then like to run a macro that sorts all information on the "status" sheet by the item selected on the input sheet.

Within the "Status" sheet all column titles are found in A2:BN2 (these titles are the same as the ones found in the dropdown list on the input sheet)

Is it possible to have a dynamic sort macro in between two worksheets that a user can select (by means of a dropdown list)?


Hi,

Is it possible to insert a pause in a module for users to input data?

My program will be something like:

1 - Activate input sheet
2 - Message box : "please input evidence" (once the user clicks ok the module normally continues running, whereas I would like it to wait)
3 - program waits as user inputs evidence either in the activated sheet or through an application (Netica, Bayesian network) created by the program
4 - once inputted the program reads the input and does it's stuff

Is this possible? is it easy to do?

since there could be a large amount of evidence to be entered I was thinking of either a timed pause (10 secs) and then a yes/no prompt as to whether all the evidence has been entered, if not the wait an extra 10 secs before prompting again and continuing like this until the user clicks yes or perhaps using just a simple ok button once all the evidence is entered, without the timed prompts...

Thanks in advance for all your help,

Mbrolass.


Hi all,

I'm wondering if there is a way to create a webpage (intranet) that will request data input from the user and then run an Excel macro on a remote machine and return the output of the macro to the user via the webpage.

The excel sheet currently requires a list of names in column A. When those names are entered columns B through Y automatically update via formulas that pull in data from a local database. After the data is pulled in, a macro can be run that ends up producing a list of all the data in sentence-form. This list is generated into a new, blank workbook and saved to a specific location.

I want to create a page that requests this list of names from the user. Once the user clicks "Go", a script (?) would run that essentially updates the excel sheet with the input data and runs the macro. The final list would then be returned to the webpage.

I'm not looking for a complete solution to this becasue I know this probably requires a ton of custom work. I'm just looking for a jump-off point. I'm not familiar with web applications at all and I'm just wondering where I would get started.

Thanks,
Joe


After a previous thread using Vlookups, I think a macro would better suit my needs. I've done quite a bit in process macros to perform tasks but nothing ever having to do with looking up values.

I have a worksheet named "Material Listing" where the data is stored in a range of B3:J35000

I need the data returned to a sheet named "Pricing Lookup" that is in a similar layout as the Material Listing with the first two columns being User Input of Part# and QTY (col B & C).

I need the macro to lookup the Part# (MRN or Material Reference Number) on the Material Listing ws then find the closest quantity (col J on Material Listing tab) to the User Input quantity (on Pricing Lookup ws) and return row data in cols C thru I from Material Listing ws to the Pricing Lookup ws.

It needs to be able to lookup 250 user input lines from the Pricing Lookup ws.

I've converted my workbook but can't figure out how to post it. Its my example worksheet with repeated Part# (MRN's) with different prices per quantity purchased as this is what it will have to work with when actual data is put in.

I left in my previous Vlookups just in case you wanted to see how it was done before hand. But they can be deleted as they don't work when I'm trying to use qty as a constraint for the lookup.

Any help is greatly appreciated


I'm new to using Macros so I need some help with hiding and unhiding columns.

Basically what I'm trying to do is have the user select years of sales to compare.

If it's possible I would like the input the user enters on the INPUT tab in cells B3, B4 and B5 to unhide the appropriate column in the RAW DATA tab so that the chart compares the years selected.

So if the user selects 2007, 2008 and 2009 on INPUT tab then only columns D, E and F would be visible on the RAW DATA tab.

Thanks in advance for any help!


Hi,
I'm running a macro that can take a while so I want to let the user know that the macro is running OK. I've put the following line in my code

MsgBox "Searching BOM's", vbInformation

The problem is that it requires the user to press OK before it runs the macro, then the box goes off and the macro runs. What I really want to do is display a box that doesn't require user input, and stays on the screen while the macro is running and goes off automatically when the macro is finished. When the macro is finished it will either show a page of search results, or another message box saying Not Found, which requires an OK response from the user.

Hope this makes sense. Thanks for looking at my question, any help greatly appreciated.


I'm new to using Macros so I need some help with hiding and unhiding columns.

Basically what I'm trying to do is have the user select years of sales to compare.

If it's possible I would like the input the user enters on the INPUT tab in cells B3, B4 and B5 to unhide the appropriate column in the RAW DATA tab so that the chart compares the years selected.

So if the user selects 2007, 2008 and 2009 on INPUT tab then only columns D, E and F would be visible on the RAW DATA tab.

Thanks in advance for any help!




Hello I have a question about making cells interdependent in Excel.

I have 5 cells that should add up to 100% and 3 that can be manipulated by the user basically:

A
User Input 1
User Input 2
User Input 3
10%
39%

In column B I have a whole bunch of formulas which are dependent on the percentages.

I want to make it so that the user is forced to input something in User Input 1 and User Input 2. While, User Input 3 is dependent on User Input 2.

So if the user puts in 20% for User Input 3, it takes the 20% from user INput 3 (effectively reducing user input 3). i want to make it so that if the total does not equal 100% there is an error, and if one input is negative that it will also display an error.

input.xlsx

this is kind of the idea

Hello! I'd like to have an input box pop up upon running the macro which allows the user to input a number (a date actually). This will then cause cell B3 to equal that date. I have no idea how I'd code this since the only thing I can do is record macros. The cell has a formula in it usually otherwise I'd just have them input the date there But I do think this would be useful to know. I gratefully and eagerly await some VBA knowledge!

cheers,

MLM



Hello,
I am new to the VBA/Macros world and I find it very interesting. I am trying to create a macros that simply calculates vapor pressure of a given amount of solvents. I have already created the database but now what I want to do is ask the user to input the "name or chemical formula" of the solvent and them my macros will look in the database, find the solvent, and with the information in the database and the input temperature, calculate the pressure. I do not know how to get it to search my entire database (2 columns) to match the input.

Thanks for your help,
Jeremiah


I would like to run a macro in the background while a user inputs data, until a condition is satisfied. For example, the macro below should record how long it takes for the user to enter "answer" in the "input" cell.

Sub timeit2()
startjb = Timer
Do While Timer < startjb + 60 'wait up to 60 seconds
DoEvents ' Yield to other processes.
inp = Range("input").Value
ans = Range("answer").Value
If inp = ans Then GoTo correct 'check if correct answer
Loop
correct:
Range("elapsed").Value = Timer - startjb 'record elapsed time
End Sub

However, when I run this macro it stops executing as soon as the user tries to enter any data in the worksheet (correct or not). Is there a way to make it keep running in the background until the condition "input = answer" is satisfied?

Thanks for any advice!


Hi,

What I require is the macro code (which I will be running from a button) that will pop up a message box asking the user for the password (which will be hidden in A1), after verifying the password is valid the user will be then prompted for the following information:-

(a) cell reference e.g. F1, G9, AB56 etc etc
(b) data to be input in cell range defined e.g. test data etc etc

When the user is happy with their choices and presses the OK button the data will be entered in to the cell selected.


Any help would be greatly appreciated


Many thanks in advance


Rob

N.B. Excel version 2003


Hi,

I am wondering how to disable temporarily anything under "Worksheet_Change" while running a particular macro. Under Worksheet_Change, I have some auto-formating rules, which require the user to input data depending on the value of the cell, but I would like all those input (and everything under Worksheet_Change) to be disabled when executing one of my macro...

Hopefully that's clear enough, let me know if it's not

I have just start using vba and I have a problem. I am using a user form to input data into a database with built in formulas. I am using modified code found on the internet which uses this line:

Rowcount = Worksheets("Orders Database").Range("A1").CurrentRegion.Rows.Count

to find the first empty row to input data. This however, factors in the built in formulas and inputs the data too far down the spreadsheet. How can I modify the code where it finds the first empty cell in say Column A then input the data in cells in that row.

Thanks


This is my first post so, Hello all
I'm trying to teach myself how to write macros using the "google" approach. I was able to write then in Lotus 123, but I am changing all to Excel.
Question: In Lotus, I used {?} in a macro to pause it and have the user input some data like numbers or letters. Then after the enter key is pressed, the maco would continue. How would I do it in Excel?
I'm using Excel 2007. I'm enclosing a sample macro:
HTML Code:

Sub Macro1()
    Range("A1").Select
    Application.Goto Reference:="R7C1"
End Sub


I would like to pause the macro after Range("a1").Select for a user to input some numbers and then continue the macro.


Thanks for the help

Mike

OK, I have a sheet with some pretty time consuming macro's which run to configure the layout, details and maths on many sheets depending on user input. I know that my code is probably the cause of most of the time taken to run these macro's, but I am new to using macro's and VB in Excel and still learning good code structure etc. So anyway, the upshot is that i have pieced ogether a progress bar from other buts of code i found on the net. The diference is my progress bar does not try to time itself to the macro that is running but rather just goes to 100% then returns to zero and goes up again. In the code for the progress bar, i use two loops, one which determins the speed the bar rises at, and the second determins how many cycles the bar should run for. My aim was to use the bar for all my macro's so it appeared whenever a macro was run and then disappear again when the macro was complete. I have now learned that when I trigger the progress bar (its done using a userform) the macro that triggers it stops and waits for the progress bar to finish running before continuing. This obviously defeats the object of the exercise and of course makes running the macro's even longer than normal.

So my question is: Is there a way to let my original macro continue to run while the progress bar is displayed?

Sounds easy, Or maybe I'm more dumbererer than i give myself credit for.

Any help much appreciated.

Lee.


OK, so I have a growing list of data on Sheet(1), currently 280+ rows and growing. Daily, I utilize a macro that goes thru the data and prompts for user input on various rows. The top row is frozen, so the column headers are visible.

Is there a relatively easy way to have the row that is waiting for user input to scroll to the top, under the frozen row? I think scrolling the first instance is pretty simple, but the subsequent one(s) seem to be problematic.

Any ideas?


HI

I am working with excel 2000. I have a macro that copies data from one sheet to another and does other functions all within the same workbook. While the macro is running the user is watching it move from one sheet to another and back again. Is there a way I can have the macro run but the user does not see it switching from sheet to sheet? So the user would always be looking at "Sheet1", the whole time the macro is running,even if the macro was working on different sheets.

I use sheet1.activate in my code, would select be a better choice?

Thanks
L




Hello,

Only basic with VBA so I am probably doing this wrong however below is my requirement and issue:

I have 2 worksheets in a workbook. Sheet 2 contains a database table and Sheet 1 is the main worksheet which allows the user to enter in their criteria in Cells E15, H15, K15, and O15

For each of the above cells the user can define the criteria based on columns in the data base.

For Example
Sheet 2
Column 1 Heading = Year
so Cell E15 the user can input "2013".
if the user inputs 2013 then the database is filtered to show only "2013" in Column 1

Column 2 Heading = Make
so Cell H15 the user can input "Car"
If the user inputs Car then the database is filtered to show only "Car" in Column 2

For each of the above mentioned criteria cells they can also be left blank, if they are blank then the database should not filter to show blank but just leave all data as is.

I have written 4 codes for each of the criteria sections as per below, then a master macro which calls all 4 macros.



Please Login or Register  to view this content.


This works fine if I run it for just 1 criteria, however when I input more than one it resets the older filter and keeps the newer one.
I have no idea how to fix this.
My alternative is to have a macro which checks what for example cell H15 equals to and deletes all rows that do not equal to H15 and loop until the database is empty. I can't however find the code for that.

ANY help would be much appreciated thank you



Hi all,

Hope all is well in your macro worlds!

I am having trouble with a user input macro.

The user inputs a date for a macro to search a row for.

The dates in the row are in a dd-mmm-yy format and I am unsure why the loop is not copying my test data.

Would someone mind having a look into it for me?

I have copied the macro below and input the Excel file if willing?




Please Login or Register  to view this content.



Many thanks in advance!


Coeus.