#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Input Box

I have the below VBA in Excel. What I would to do is inhance it to be
prompted to input a number in the line Set rStoreNo = Range("g7:g9753") only
where the 9753 is. The columns will always be the same as will g7. Also I
would like the same for rStoreNo.Value = "0002" where it says "0002".

Sub InputStoreNum()

Dim rStoreNo As Excel.Range

Set rStoreNo = Range("g7:g9753")
rStoreNo.Value = "0002"
Call DeleteRows

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Input Box

Hi,

Something like the following but look up InputBox in help for other
parameters that can be used with it.

Sub InputStoreNum()

Dim rStoreNo As Excel.Range
Dim strInput As String


strInput = InputBox("Enter the row number")

Set rStoreNo = Range("g7:g" & strInput)

rStoreNo.Value = InputBox("Enter the value to insert in range")

Call DeleteRows

End Sub

--
Regards,

OssieMac


"Beep Beep" wrote:

I have the below VBA in Excel. What I would to do is inhance it to be
prompted to input a number in the line Set rStoreNo = Range("g7:g9753") only
where the 9753 is. The columns will always be the same as will g7. Also I
would like the same for rStoreNo.Value = "0002" where it says "0002".

Sub InputStoreNum()

Dim rStoreNo As Excel.Range

Set rStoreNo = Range("g7:g9753")
rStoreNo.Value = "0002"
Call DeleteRows

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Input Box

Sub beep()
x = Application.InputBox(prompt:="Number please", Type:=1)
Set rStoreNo = Range("g7:g" & x)
End Sub

--
Gary''s Student - gsnu200812


"Beep Beep" wrote:

I have the below VBA in Excel. What I would to do is inhance it to be
prompted to input a number in the line Set rStoreNo = Range("g7:g9753") only
where the 9753 is. The columns will always be the same as will g7. Also I
would like the same for rStoreNo.Value = "0002" where it says "0002".

Sub InputStoreNum()

Dim rStoreNo As Excel.Range

Set rStoreNo = Range("g7:g9753")
rStoreNo.Value = "0002"
Call DeleteRows

End Sub

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
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF ALex Excel Worksheet Functions 2 March 14th 05 09:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 10:07 AM.

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

About Us

"It's about Microsoft Excel"