Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Get row number using input box

I need to get the row number from a sheet by using an input box
type = 8 ?
Once I have the row it will be used to copy selected columns to another sheet.

Right now I' using this:

Sheets("Tickler").Select
myvar = Application.InputBox("Enter Line number to retrieve Row", "OPTIONS", _
Type:=1)

Range(Cells(myvar, 16), Cells(myvar, 22)).Select
Selection.Copy
....
AH
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Get row number using input box

I text box returns a string and you need a number

from
Range(Cells(myvar, 16), Cells(myvar, 22)).Select
Selection.Copy
to
Range(Cells(val(myvar), "P"), Cells(val(myvar), "V")).Select
Selection.Copy
"Allan" wrote:

I need to get the row number from a sheet by using an input box
type = 8 ?
Once I have the row it will be used to copy selected columns to another sheet.

Right now I' using this:

Sheets("Tickler").Select
myvar = Application.InputBox("Enter Line number to retrieve Row", "OPTIONS", _
Type:=1)

Range(Cells(myvar, 16), Cells(myvar, 22)).Select
Selection.Copy
...
AH

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Get row number using input box

Type 8 is useful if you want the user to do the selection with the mouse
rather than the keyboard:

Sub dural()
Dim r As Range, s As String
s = "select cells to copy with mouse "
Set r = Application.InputBox(s, Type:=8)
r.Select
Selection.Copy
End Sub

--
Gary''s Student - gsnu200747


"Allan" wrote:

I need to get the row number from a sheet by using an input box
type = 8 ?
Once I have the row it will be used to copy selected columns to another sheet.

Right now I' using this:

Sheets("Tickler").Select
myvar = Application.InputBox("Enter Line number to retrieve Row", "OPTIONS", _
Type:=1)

Range(Cells(myvar, 16), Cells(myvar, 22)).Select
Selection.Copy
...
AH

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Get row number using input box

Thanks, using the mouse option was just what I was looking for.


--
AH


"Gary''s Student" wrote:

Type 8 is useful if you want the user to do the selection with the mouse
rather than the keyboard:

Sub dural()
Dim r As Range, s As String
s = "select cells to copy with mouse "
Set r = Application.InputBox(s, Type:=8)
r.Select
Selection.Copy
End Sub

--
Gary''s Student - gsnu200747


"Allan" wrote:

I need to get the row number from a sheet by using an input box
type = 8 ?
Once I have the row it will be used to copy selected columns to another sheet.

Right now I' using this:

Sheets("Tickler").Select
myvar = Application.InputBox("Enter Line number to retrieve Row", "OPTIONS", _
Type:=1)

Range(Cells(myvar, 16), Cells(myvar, 22)).Select
Selection.Copy
...
AH

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
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
number input dennisp New Users to Excel 2 August 8th 06 06:20 PM
number input box Stan Halls Excel Worksheet Functions 4 June 27th 06 01:12 PM
User Input Of A Number Chuckles123[_48_] Excel Programming 0 November 11th 04 05:27 AM
making a cell fixed number to a input number fwday[_2_] Excel Programming 1 October 25th 03 02:38 AM


All times are GMT +1. The time now is 04:33 PM.

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

About Us

"It's about Microsoft Excel"