Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an input box where the user is prompted to enter a range to
search for a particular character. In this case a "|". Upon finding it, its column will be hidden. I would like to have the option to either type in the range, or use the mouse to select the range. BTW, I spent two hours debugging this codelet yesterday - tearing my hair out - turns out my vision was the problem, my code was right from the start, except for "entireoolumn" AAARGH! appreciate any help Andrew J. Fox |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Andrew,
This example out of code I have been helping someone else with. Dim rng2 as Range On Error Resume Next Set rng2 = Application.InputBox(Prompt:= _ "Please select a range with your Mouse.", _ Title:="SPECIFY RANGE", Type:=8) On Error GoTo 0 If rng2 Is Nothing Then MsgBox "User cancelled" _ & Chr(13) & "Processing will terminate" Exit Sub End If Regards, OssieMac "green fox" wrote: I have an input box where the user is prompted to enter a range to search for a particular character. In this case a "|". Upon finding it, its column will be hidden. I would like to have the option to either type in the range, or use the mouse to select the range. BTW, I spent two hours debugging this codelet yesterday - tearing my hair out - turns out my vision was the problem, my code was right from the start, except for "entireoolumn" AAARGH! appreciate any help Andrew J. Fox |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 1, 7:29 am, green fox wrote:
I have an input box where the user is prompted to enter a range to search for a particular character. In this case a "|". Upon finding it, its column will be hidden. I would like to have the option to either type in the range, or use the mouse to select the range. BTW, I spent two hours debugging this codelet yesterday - tearing my hair out - turns out my vision was the problem, my code was right from the start, except for "entireoolumn" AAARGH! appreciate any help Andrew J. Fox Sorry for the trouble, after the posting I was browsing recent topics and stumbled on an answer. Thanks ossiemac. The subject line was: Macro to filter rows containing user defined data What an amazing - and often humbling - resource this is! ajf |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 1, 7:51 am, green fox wrote:
On Nov 1, 7:29 am, green fox wrote: I have an input box where the user is prompted to enter a range to search for a particular character. In this case a "|". Upon finding it, its column will be hidden. I would like to have the option to either type in the range, or use the mouse to select the range. BTW, I spent two hours debugging this codelet yesterday - tearing my hair out - turns out my vision was the problem, my code was right from the start, except for "entireoolumn" AAARGH! appreciate any help Andrew J. Fox Sorry for the trouble, after the posting I was browsing recent topics and stumbled on an answer. Thanks ossiemac. The subject line was: Macro to filter rows containing user defined data What an amazing - and often humbling - resource this is! ajf Just realized I didn't post my code, what an idiot. FYI here it is, including ossiemac's contribution: Sub HideColumnIf() Dim acell, pr On Error Resume Next Set pr = Application.InputBox(Prompt:= _ "Please select a range with your Mouse.", _ Title:="SPECIFY RANGE", Type:=8) On Error GoTo 0 For Each acell In pr If acell.Text = "|" Then acell.EntireColumn.Hidden = True Next acell End Sub thanks again, ajf |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need an input box when user selects a value in a drop down box | Excel Worksheet Functions | |||
Capture the range a user selects and put in textbox. | Excel Programming | |||
pause macro until user selects correct range | Excel Programming | |||
Prompt For User Mouse Input In Macro? | Excel Programming | |||
User selects a range | Excel Programming |