From: Colin Hayes on 18 Apr 2010 15:31 Hi I have a small request for help with code. I need a simple macro to have popups request the first and last cells in a range , and then to select the range indicated in the popups. Can someone help? Grateful for any assistance
From: Gary''s Student on 18 Apr 2010 16:22 Something like: Sub PickaRanage() Dim s1 As String, s2 As String, s3 As String s1 = Application.InputBox(prompt:="Enter address of first cell", Type:=2) s2 = Application.InputBox(prompt:="Enter address of last cell", Type:=2) Range(s1 & ":" & s2).Select End Sub -- Gary''s Student - gsnu201001 "Colin Hayes" wrote: > > Hi > > I have a small request for help with code. > > I need a simple macro to have popups request the first and last cells in > a range , and then to select the range indicated in the popups. > > Can someone help? > > Grateful for any assistance > . >
From: Colin Hayes on 18 Apr 2010 17:38 In article <122F67CF-2E5C-4F49-BF51-74CC0C946534(a)microsoft.com>, Gary''s Student <GarysStudent(a)discussions.microsoft.com> writes >Something like: > >Sub PickaRanage() >Dim s1 As String, s2 As String, s3 As String >s1 = Application.InputBox(prompt:="Enter address of first cell", Type:=2) >s2 = Application.InputBox(prompt:="Enter address of last cell", Type:=2) >Range(s1 & ":" & s2).Select >End Sub > HI OK Thanks - that's perfect. Out of interest , if you made the s1 line Type:=8 , what change would you need to make in the Range(s1 & ":" & s2).Select line? Best Wishes
From: Gary''s Student on 18 Apr 2010 19:36 Good question: Sub Range8() Dim r1 As Range, r2 As Range Set r1 = Application.InputBox(prompt:="Enter address of first cell", Type:=8) Set r2 = Application.InputBox(prompt:="Enter address of last cell", Type:=8) Range(r1, r2).Select End Sub and you can use the mouse to service the input boxs. -- Gary''s Student - gsnu201001 "Colin Hayes" wrote: > In article <122F67CF-2E5C-4F49-BF51-74CC0C946534(a)microsoft.com>, Gary''s > Student <GarysStudent(a)discussions.microsoft.com> writes > >Something like: > > > >Sub PickaRanage() > >Dim s1 As String, s2 As String, s3 As String > >s1 = Application.InputBox(prompt:="Enter address of first cell", Type:=2) > >s2 = Application.InputBox(prompt:="Enter address of last cell", Type:=2) > >Range(s1 & ":" & s2).Select > >End Sub > > > > HI > > OK Thanks - that's perfect. > > Out of interest , if you made the s1 line Type:=8 , what change would > you need to make in the > > Range(s1 & ":" & s2).Select > > line? > > > > Best Wishes > . >
From: Colin Hayes on 18 Apr 2010 21:17 In article <769D7454-9D71-401C-9B96-5FEFB4D6E634(a)microsoft.com>, Gary''s Student <GarysStudent(a)discussions.microsoft.com> writes >Good question: > >Sub Range8() >Dim r1 As Range, r2 As Range >Set r1 = Application.InputBox(prompt:="Enter address of first cell", Type:=8) >Set r2 = Application.InputBox(prompt:="Enter address of last cell", Type:=8) >Range(r1, r2).Select >End Sub > >and you can use the mouse to service the input boxs. Hi OK Thanks. This allows input by keyboard and/or mouse I see. Perfect first time again. I'm grateful for your time and expertise. Best wishes
|
Pages: 1 Prev: Count Next: How do I use standard notepad (unicode) font for special character |