InputBox Error :: Get A Range A Data From The User

Aug 1, 2008

I am using an inputbox to get a range a data from the user.

View 10 Replies


ADVERTISEMENT

Using Inputbox To Get Data From User To Be Used In IF Statement

Mar 25, 2014

I have found a base macro that has most of what I want the only problem is I need it to search column A by the data entered by the user in the inputbox and send out an email if it meets all the requirements. I also need it to be able to be able to do that search by only the first letter of the company name (example, only needing to put in A in the inputbox for Amber Inc.). If I remove the red text the macro works perfectly but just runs down the list on the spreadsheet.

Column A has company names, Column B has email address' and Column C has the company contacts first name.

[Code] .....

View 5 Replies View Related

InputBox User Validation

Jun 16, 2009

InputBox User Validation. Need to modify my code as follows?

View 5 Replies View Related

Can Inputbox Have Selections For User?

Sep 18, 2009

I have not used Inputboxes or Userforms much. I have read through some of the messages here, but I need to learn more about them. I need to create some type of user interface, where the user would be asked to select between two choices. Based on the choice made, a macro would be executed. The two choices run different macros.
I need direction or an example of an Inputbox that shows two choices instead of a blank input space.

View 3 Replies View Related

Inputbox To Appear Asking The User To Enter An Amount

Nov 8, 2007

i need an inputbox to appear asking the user to enter an amount(we'll call XX).

Now the code will find that value in Column F, and delete the row that contains the value XX in F

View 9 Replies View Related

Create An Inputbox That Asks A User Which Set Of Rows To Copy

Aug 20, 2009

The example file gives a better visual explanation. Just want to copy a range of cells by pressing a command button. However I want the macro behind it to ask the user which set of rows to copy.

View 14 Replies View Related

Force User To Enter (Year End) Or (Qrt) Using Inputbox Method

Oct 31, 2011

I need to force users to enter one of these words only (Year End) or (Qrt) using inputbox method.

Note that user must not leave the inputbox until he/she enter one of these words.

View 1 Replies View Related

Type Mismatch Error On InputBox

Oct 16, 2009

I am trying to only have the option 1, 2, or 3 be entered. I have that part down, but if someone clicks cancel or just closes the input box i get the type mismatch I believe because no integer was found....is there a way around this?

Dim intResponse As Integer
intResponse = InputBox("Choose One" & Chr(10) & Chr(10) & "1 - Lease Lock" & Chr(10) & "2 - Upgrade" & Chr(10) & "3 - Lease Lock & Upgrade", "Contract(s) sent out")
If inResponse <> 1 Or strResponse <> 2 Or strResponse <> 3 Then
MsgBox "Must choose (1,2,3)"
Exit Sub
End If

View 2 Replies View Related

InputBox Error :: Simple Statement

Jul 30, 2009

experienced coder (not VBA) and I'm having trouble with a simple statement. No idea why it was working before and moving it to it's own Sub screwed it all up.

Sub InitialMessage()
On Error GoTo BadEntry
SiteTotal = InputBox("Enter the number of approved sites *Must be an Integer > 0*")

BadEntry:
Entry = "Bad"
Msg = "An error occurred!" & vbNewLine
Msg = Msg & "Make sure you enter a valid value in all the prompted Message Boxes"
MsgBox Msg

View 9 Replies View Related

Code Excecution Interrupted Error Using InputBox

Jun 15, 2009

I have been using a specific macro for at least 2 years now without incident...

but today for some reason I am get an error: ....

View 10 Replies View Related

PRINT Macro: Prevent Error When Canceling At InputBox Level

Apr 18, 2009

I have a macro that asks the user what pages they would like to print on a particular sheet. In the example below, a button will be assigned to pages 1-5 on a sheet and thus the user has the option of printing from page 1 up to page 5. Any page number outside this range will result in an error message and the user will be asked to re-enter the end page number. This is the code I pulled from this forum and partially modified:

View 4 Replies View Related

Application.inputbox: Range To Copy And Paste The Range's Link And Format To A Different Sheet

Oct 7, 2009

Need a code using application.inputbox to get a range, then use that range to copy and paste the range's link and format to a different sheet? The specifics don't matter, I just can't figure out the syntax. Here is what I have currently:

View 2 Replies View Related

Inputbox Button Control + Msgbox For Empty Inputbox

Jun 30, 2009

I have the inputbox so i can set a string value,
When the inputbox Cancle button is pressed i want to exit sub,
If the inputbox value is nothink and ok button, I want the msgbox displayed then goto newname.
If the inputbox has a value do >>>>>>That>>>>>

View 6 Replies View Related

Import Data To User Specified Range

Jan 25, 2008

I'm trying to find a way to import data from an external CSV file. I've used the import data function off the menu, so know how that works. However, I want to change how that works slightly by forcing the user to select a specific cell start the import at, as well as force certain of the options. Once the import is complete, I then need to fire off a custom macro. The only other option I can think of is to write a completely custom import screen, but I'd like to avoid that if possible.

View 3 Replies View Related

Range Defined By Inputbox

May 13, 2008

I have a spreadsheet that has 7 columns starting at B and 12 rows. Column B has numbers from 1 to 12 down the rows. I have an inputbox that asks the user for a number from 1 - 12 that relates to a tax period. What I'd like to do is depending on what number they give have that define the range. If they gave me the number 2 my range would be C11:F11, if the number was 10 the range would be C7:F7. The inputbox returns strTaxPeriod.

View 9 Replies View Related

User Form, How To Save And Add Data To Range

Jul 15, 2009

I have a user form designed and now I would like to be able to program a Command Button to "SAVE" and when it is clicked, I would like to save the results of my fields to another worksheet. I have a defined range that I would like to have the inserted row into?

View 2 Replies View Related

Summing Data In A User Defined Range

May 3, 2007

I have a spreadsheet which links to an external source, runs a sql msquery and retrieves data based on dates selected by the user from two drop down lists. From Date and Date To.This works fine. However I also need to total any fixed data which resides in the same spreadsheet based upon the same dates selected. The end user selects 2 dates , say 15/04/2007 (this relates to a week number,week15)and 28/04/2007(week 17)
A column of data lists the week numbers (in cells A3 - A22) and next to this their respective production quantities in cells B3-B22.

I now have a problem in totaling the production quantities in the worksheet as my user is not just selecting the week numbers 15 and 17 but 15,16 and 17.

qty
week 15100
week 16123
week 1789

How do I sum from 15 to week 17 inclusive or any other range selected?

View 7 Replies View Related

Copy Range And Paste Using Inputbox?

Apr 25, 2014

I am using below code to copy certain data(Range("C4:R46")) and paste after certain row(After 43 rows) with 50 times

I want to popup a inputbox who asked for how many time u want to paste data, if i choose 4 then paste data after certain row(After 43 rows) with 4 times

If I choose 14 then paste data after certain row(After 43 rows) with 14 times

[Code] .....

View 4 Replies View Related

How To Select Range W/ Application.InputBox

Sep 30, 2009

I am trying to select a range using this method. I am indicating type:=8, but isn't the box itself supposed allow you to select a range on a sheet? I cannot do this.

My only thought is that I have disabled events and updating; could that be it?

View 9 Replies View Related

Using InputBox Method To Select Range From Other Sheets

Jun 23, 2006

Using InputBox Method to Select Range from Other Sheets

I need to select a range of cells from a second workbook via a InputBox or similar.

I'm trying to do that with the following

Sub InputBoxTest()
Dim MySelection As Range
Set MySelection = Application.InputBox(prompt:="Select a range of cells", Type:=8)
MySelection.Select
End Sub

But I can't select a cell range if it is located in other workbook.

View 5 Replies View Related

Copy Data Based On Date Range Put In By User For Report

May 16, 2006

I have looked through the forum and found pits and peices but can not put the puzzle together. Found the VBA code in my example from a earlier post but there was no final answer to the post.

Trying to have the user put in a date range via command button. Fro mthis date range the data thats falls within that range is copied to a report sheet. Will also need to have all the old data from a earlier querry removed. Have attached example sheet.

View 9 Replies View Related

Inputbox Method NOT Returning Multi-cell Range Object

Jun 15, 2012

I have the following code in Destination.xlsm that is intended to:

request the user to select a multi-cell range in a column of single-sheet Source.xlsm, in which some but not all cells contain "Y" (to indicate that this row of data relates to a National Account, versus a Territory Account)loop through the selected range, and whenever a cell contains "Y", copy the entire row and insert it in Destination.xlsm above a cell named "rngDest".

Code:

Sub Copy_NationalAccounts_Rows()

Const Message As String = "Select the entire range containing National Account Y flags, then press Enter or click OK."
Const Title As String = "Copy National Accounts"

Dim rngSource As Range
Dim rngDest As Range
Dim r As Range
Dim c As Integer
Dim wbk As Workbook

[Code] ........

View 5 Replies View Related

VBA If Range Value = Something AND Another Cell Has No Entry- Prompt The User To Enter Data- My Code Is Not Working

Apr 20, 2009

I am trying to display a message box for the user if there is "agency" in cell o8 but nothing in p8... I tried the following code but it doesnt work..


If Range("o8").Value = "Agency" And Range("p8").Value = "" Then

MsgBox "Please provide name of agency in cell p8"

Sheet9.Shapes("cross").Visible = True

Else

View 9 Replies View Related

InputBox To Edit Data

Oct 2, 2008

I have a worksheet, attached, that is a supplier response to a purchase order. Column E contains the original qty ordered of each part number, Column H contains the original price. Now, I've created a quick macro, (in the workbook), that copies the original values to the confirmed values, and the formulas in columns G and J calculate the qty backordered, or flags the part as a price change.

After copying the original PO values to the confirmed values, the supplier would need to go in and make whatever changes are necessary. For example, we ordered 3 and they shipped 0 of a certain part, or the price has changed.

What I would like to do is create a macro that pops up an input box where the supplier enters the Keystone part number, (column A), then enters the new quantity or new price, and those items are automatically changed on the response form. I picture it in the form of 3 input boxes, in the first box the buyer enters a part number. A second box pops up asking if it's a qty change or price change. They would enter the value in a 3rd box, and that value would automatically be changed on the response.

View 5 Replies View Related

Inputbox To Exclude Data

May 16, 2008

I need to have an inputbox for users to enter multiple store numbers. What I need to do is actually filter out the store numbers that was entered into the inputbox
my code so far is:

'Inputbox to filter out new stores
Newstore = InputBox("Enter New Store Numbers seperated by a space", "Enter New Stores", "119 120")
x = Split(Newstore, " ")
For i = 0 To UBound(x)

Range("A1").CurrentRegion.AutoFilter Field:=2, Criteria1:=Array(x) _
, Operator:=xlFilterValues
Next i

View 9 Replies View Related

SaveAs - Inputbox Data

May 31, 2006

I want to use the SaveAs function using the Inputbox results. The user will input a date like 5-30-06. Then I want save the workbook as "WE5-30-06.xls". I can't figure out how to do this b/c it wants to use 5/30/06 which isn't allwoed in naming conventions. BTW the inputbox name is dWeekend.

View 2 Replies View Related

Prevent The User From Saving The Data Input From The User Form If Any Of Those Three Fields Is Left Blank

Feb 9, 2010

I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.

What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)

View 2 Replies View Related

Select Next Column After Data Input Into InputBox

Jul 18, 2009

Here is my delimma. I am using the standard InputBox for my users to input the number of errors found for each category in a record from a daily report. The problem I having is that every time the user types in data using the InputBox it overwrites the previous days numbers. I need to set up the InputBox code so that after the user has input the numbers for that day that the next time the InputBox is used it selects the next column to the right and continues to do this for each day.

View 4 Replies View Related

Setting A Data Range For A Chart (error 1004).

Feb 1, 2010

I'm trying to do a simple loop which creates charts based on an ID number. I recorded a macro and has tried to modify it but am having trouble defining the correct reange when settign the data source. Here is my

View 2 Replies View Related

How To Prevent User Error

Jan 6, 2009

I have a simple spreadsheet which requires a date (mm/dd/yy) in Column A. Columns B-F use formulas to break this date down into the month, quarter, year, etc. Users frequently need to add new rows at the top of the sheet just below the column headers.

To be sure the formulas in Columns B-F are included when adding new rows, I put together a simple macro which copies the top ten rows, inserts them at the top of the sheet, and then clears existing data from the new rows (keeping formulas intact).

I put a button on the sheet to run this macro. However, sometimes users insert new rows without using the macro. This results in no data in Columns B-F for these new rows because the formulas weren’t copied.

How can I prevent this from happening? If I protect the sheet and prevent users from inserting new rows, the macro won’t run. Is there something I can add to the macro that will allow it to run properly while the sheet is protected? Below is the macro code.

Private Sub CommandButton1_Click()
Rows("3:12").Select
Selection.Copy
Rows("3:3").Select
Selection.Insert Shift:=xlDown
Range("A3:A12").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("G3:K12").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A12").Select
End Sub

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved