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


ADVERTISEMENT

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

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

Application InputBox Cancel

Feb 24, 2010

Application.InputBox ("test")
I get a cancel button, I want this to show a message and then exit the program.

My entire porgram is in one Sub.

View 9 Replies View Related

Select Sheet Using Inputbox?

Jun 5, 2014

i have a close workbook with path ("Z:42766Jan 2 Dec 2014Tally.ERP9GrpSum.xls") from another open workbook i want to popup a inputbox to select the sheet and run the macro on selected sheet.

e.g
i put 2 in inputbox than run the macro on sheet2

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

Inputbox Method: Cannot Select Cells In Worksheet

Aug 26, 2009

I'm using an inputbox to let the user select a range of cells. Here's the line
Set MyRange = Application.InputBox("Select cells with numeric data", Type:=8)

When the inputbox comes up, it won't let the user click any cells (or anywhere in the worksheet, for that matter). The cell/range reference has to be typed in manually.

View 9 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

Range.select Error (SELECT METHOD OR RANGE CLASS FAILED)

Jul 23, 2008

I have this:

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Activate
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
ActiveCell.PasteSpecial
End Sub
it errors to: SELECT METHOD OR RANGE CLASS FAILED

View 9 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

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

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 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

Macro Range Application

Jan 14, 2009

I have a worksheet using several columns and 100 rows. Column B and column C can contain a value "x" in either coulmn but not both in a specific row. The macro illustrated works perfectly for what I need but there must be a way to point the macro to a range of rows rather than using an "if" statement for each row as I've done.

View 5 Replies View Related

Range Select Statement To Select A Cell

Jul 7, 2008

I want to put a range select statement to select a cell and count down 10 cells and copy.

View 9 Replies View Related

If Select Sheet, Select Range Statement

Oct 4, 2007

I have a command button on sheet MASTER. When the workbook is Activated I want it to check and see if in sheet COSTM, cell B3 there are the words "Project Number", if so then show command button (ClearPrevious), if not, don't show. Also, when the If statement is finished, then the workbook needs to end up showing the sheet MASTER. I have tried various codes and none work, or they are on perpetual loops. I know this has got to be simple, but cannot find an example to take from to solve the issue. Would appreciate any help offered. Below is code I have right now.

Private Sub Worksheet_Activate()
If Sheets("COSTM").Select Range("B3").Select = "Project Name:" Then
Me.ClearPrevious.Visible = True
Else
Me.ClearPrevious.Visible = False
End If
Sheets("MASTER").Select
End Sub

View 9 Replies View Related

Application.DisplayAlerts Freezes Application

Jul 14, 2006

Im copying and pasting data from one workbook to another but when I want to close the source workbook, it comes up with this message that I have much data and if I want to keep this in a clipboard. I thought I could disable this with Application.DisplayAlerts = False but when I do this, Excel freezes. Im I doing something wrong. How can I supress this window?

Public path As String
Sub Get_data()
path = "\Nlchoosa.nlOPS_Processes$OPS_ProcessesReports Sector performance"
Workbooks.Open Filename:=path & "ReportsSector Performance Reporting week.xls"
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.copy
Windows("Sector Performance report Week.xls").Activate
ActiveSheet.Paste
Application.DisplayClipboardWindow = False
Windows("Sector Performance Reporting week.xls").Activate
Application.DisplayAlerts = False
End Sub

View 6 Replies View Related

'Select Method' Failure 'error 1004 Select Method Of Range Class Failed'

Oct 28, 2008

My workbook holds a month template and sheets for each month. I work on modifications in the template ,but would then like to update all the monthly worksheets. I recorded a macro to show me how to start programming the vb sub, but get a runtime failure 'error 1004 Select method of range class failed' when trying to select the column to copy,

View 4 Replies View Related

Select A Range That Will Be Changing By Column: Method 'Range' Of Object '_worksheet' Failed

Jan 6, 2010

I'm trying to select a range that will be changing by column. I'm not sure why my syntax isn't working. What I've got:

View 2 Replies View Related

Select Range In Worksheet Where Last Cell In Range Is Variable?

Jan 27, 2012

I am trying to write code to select a range in a worksheet where the last cell in the range is variable.

Sub DataTest()
Dim LastColumn As Integer
Dim LastRow As Long
Dim LastCell As range

[Code].....

View 8 Replies View Related

Application-defined Or Object-defined Error :: Add Named Range At Run-time

Oct 4, 2006

Trying to add a named range at run-time

Here's what I have so far ...

View 9 Replies View Related

Select Range In Entire Column To Fit Range From Another

Mar 26, 2013

i want information on my "Intra-op tab" to automatically populate on my "Tissue" tab. In Column "A" of my intra-op tab i enter case id's, 1 per row, and i would enter a date received under column "D". On my "Tissue" tab, i also enter those case id's under column "A" but i would have multiple rows of the same number. I want that whenever i type a specific case id on my "Tissue" tab, it will automatically fill in the date in column "T", the date that coincides with the case id in column "D" of my "Intra-op Kit" tab.

View 1 Replies View Related

Range Selection Error (application-defined Or Object-defined)

Jun 9, 2009

I am having some trouble with a variable range selection within a regression. I keep getting an "application-defined or object-defined error." I've isolated each statement to find that the code that is causing the regression not to work is below (the error for that line of code states that the Select method of Range class failed):

View 6 Replies View Related

Application-defined Or Object-defined Error :: Range & Offset

Feb 26, 2009

this is the line it gives the error on.

Range("A1").End(xlDown).Offset(1,0).Select

View 9 Replies View Related

Application-defined Or Object-defined Error Using Range

Jun 5, 2009

So I'm correcting macro at work and keep running into this error:
"Application-defined or object-defined error"

View 5 Replies View Related

Select Range Using 2 Range Names

May 29, 2009

I know I'm not too bright, but I've really lost it here. Can someone give me the sintax to select all cells between two names: Start thru End

View 5 Replies View Related

Select The Range

Sep 14, 2008

if my excel file data in column a:h, and in column a is date data in every day. i try to know how to write vba code in the case of selection data by the date, that i want to select for any propose (copy or printing). eg. date data "dd/mm/yyyy" when i put it to input box

View 11 Replies View Related

Range Does Not Select

Dec 29, 2008

I'm trying to select a range of dates, contiguous from "AZ2" until the last entry using the following lines. The last cell in the column is selected instead of the entire range of dates from "AZ2" until the nth cell. I'm using Excel 2007. Below are the lines I'm using:

View 3 Replies View Related

Select Used Range

Mar 26, 2009

I know I've seen the syntax for this before, but have done multiple searches and for the life of me I can't find it. Here's what I'm wanting to accomplish. In my spreadsheet I have hundreds of rows of data. Columns E thru G of this data contain numbers, and I must insure they are formatted as such. To do this, I simply put a "1" in an empty cell, copy it, then select the range I want to format, paste special, choose values and multiply.

Easy enough, but when I try to do it via macro I get a bunch og "0" in the empty cells. I can't find how to select only the used rows in those columns. Here's an example of what I've got.

View 2 Replies View Related

Using VBA To Select A Range

Sep 18, 2009

i basically need to print out the attached sheet in a particular way as shown on sheet 4

However the problem occurs because the printarea can vary

i.e first page will consist of the the range a1:J ......

View 14 Replies View Related







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