-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Function to allow InputBox or Selection #14
Comments
I guess Set rng = Application.InputBox("Range:", "Range", Selection.Address, Type:=8) I will wrap it in a |
That is a nice way to solve this. Is the |
It looks like it. The documentation claims that it can be a I will go ahead and create this |
Commit involves a number of changes: - Adds error handlers or changes code to not need them, see #31 - Adds a Sub to DeleteAllCharts and replaces previous usages of this, see #36 - Adds a Function to GetInputOrSelection which prompts for a Range with Selection as default, see #14 - Removes the GetRow function for the CSV Sub and instead uses a double Transpose, related to #31 - Adds a couple of comments throughout for TODO items - A couple of items have their case changed rows->Rows. The VBE is doing this automatically.
This has been added as The outstanding work on this is then:
|
This has been added, so I should re-clone to be updated? |
You probably want to sync your fork with this one to get up to date. Depending on how you're configured, you should probably follow this and possibly this one first if you don't have I try to use GitHub for Windows wherever possible (I'm lazy) but am not sure how it handles syncing a fork; I have not done that yet with it. |
I just went and did a pull request on my from yours (web interface). All my projects are in my dropbox folder so syncing one machine will sync all machines. I don't have the client at work so I always end up in teamviewer syncing commits from my w7 home box, ha. The fork syncing process seems a little more complicated than the regular process, what with the upstream and everything. I tried setting it up in osx a while back with terminal and I think I ended up breaking something and backed it out. |
I thought it might be more useful to add a parameter to the function -
This will help with subs like
By returning |
Implement the GetInputOrSelection in the places where InputBoxes were used. See #14, this probably closes that one out.
I think this issue is fairly resolved. There are probably a couple additional things to consider for this Function going forward:
Regarding the error handlers, we can probably take a second look at where some of those are placed now. Since the Function returns |
I was just struggling with something similar to the inputbox thing so I came back here looking for it. Apparently if you require Type 8 input (range) and have a range variable being set to the result, the inputbox will throw an error if the user hits cancel (and maybe when the range is blank). This makes it impossible to catch the error with an
I did put this on SO http://stackoverflow.com/a/36630124/1161309 |
InputBoxes can be a pain. There is a function in butl called GetInputOrSelection that does something similar. It defaults the input to the currently selected range if there is one. Can't remember how I handle the errors though. (I may not) I'll go over the commits tonight or tomorrow night. My work schedule has temporarily changed a bit and I am away from the computer most of the day.
|
This is tied to #13 which will create a settings file. It would be good to allow the formatting to be applied to an input or to the Selection.
The text was updated successfully, but these errors were encountered: