![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 09:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com