how to create a button in 2010 and 2007 excel that in one click the selected data will be transfered in a specific sheet? - performance

I need your help. I am creating a database and I need to create a button that will help me transfer selected cells/data to a separate sheet. I have "pended" cases that I need to copy and paste on a sheet named "Pending Cases" and I'd like to do it by inserting a button on a sheet. I know this is possible. Please help. Thank you!

To add a button you can display the Develop Tab. In Excel 2010 right-click in the Ribbon, choose Customize the Ribbon, and click Developer on the right-hand side. In 2007, click the Office Button, Options, and this option is towards the top of the first Tab.
In the Develop Tab, Controls Group, click Insert and choose Form Controls, Button. When you drag to draw this on the worksheet it will then ask you to assign a macro to this button. You can Record a macro from here, or type a name for your procedure and press New.
The following code copies data from one sheet range to another.
Application.ScreenUpdating = False
Worksheets("Sheet2").Range("B1:B4").Value = _
Worksheets("Sheet1").Range("A1:A4").Value
Application.ScreenUpdating = True

Related

Keyboard navigation for RadListBox with icons

I am using RadListBox to show a list of items. Each item has an icon. The requirement is jumping on the item when a the first letter of that item is pressed.
For example: It should focus on "Dock" when letter "D" is pressed
Is there any built-in feature to accomplish this>
This functionality is built into the RadListBox right out of the box.
You must have the list box focused and then type a key to select the item with the first letter matching the key that was pressed. In order to focus on the list box you can either: click with the mouse, tab to it, set focus in JS, or use the KeyboardNavigationSettings.CommandKey and KeyboardNavigationSettings.FocusKey to help aid with keyboard navigation.
Example:
RadListBox1 = new RadListBox()
RadListBox1.KeyboardNavigationSettings.CommandKey = KeyboardNavigationModifier.Alt;
RadListBox1.KeyboardNavigationSettings.FocusKey = KeyboardNavigationKey.L;
You can also use EnableMarkMatches to highlight more than one match if necessary and for typing more than one letter for selecting.
Reference: Telerik RadListBox Keyboard Navigation Demo << This has all the sample code you should need.
Seems this a Telerik bug, but i made a project, test situation and it's working.
download sample project here.
this project tested on google chrome Version 60.0.3112.113 (Official Build) (64-bit)
After run project press Alt+s or Alt+o or Alt+c
Remember change AccessKey property to change shortcut key:
RadListBox1.Items[0].AccessKey = "s";
I should say that this NOT a perfect solution.
RadListBox is a powerful ASP.NET AJAX control to display a list of items. It allows for multiple selection of items, reorder and transfer between two listboxes. Drag and drop is fully supported as well.

Positioning mouse cursor on another Application's List item entry based on its text value

I want to do an automation using Excel VBA. First of all I am not sure if its possible so I need to explain the problem first.
I would launch an application which has a list of reports , that one can run by right clicking on any of these and selecting an entry from the popup menu caled say "Run this report". The problem is the report names are displayed in a listbox.
There are so many entries I only need to run a few of them based on their names.
To achieve this I thought about placing the mouse cursor on the text displaying the appropriate report name and then trigger the right click event. These can be done using Windows APIs.
The challenge I am facing is how to hover my mouse on any particular list item based on its display text.
I can enumerate all the windows controls based on the handle of the application's window, but is it possible to get the location of any item on the screen based on the text displayed on list item.

VB6 + how to switch between windows/frame in form by buttons

I am very new beginner with VB6 and I hope I explain the things right
I want to create form with 2 buttons (the buttons are located on the top form position )
So each button will switch to other form/window/frame
For example
The first button will show window 1 (there I can set only parameters)
The second button will show window 2 (there I can set only IP address)
Please advice if we can do that by VB6 ?
And if yes how to do that ( step by step )
Remark - Similar example but with multiple windows in the same form is the system properties ( right click on my computer and properties ) , the we can see each button will view different window
Create a form with 2 buttons, Command1 and Command2.
On this form, create 2 frames, Frame1 and Frame2. hide Frame2 and make sure to line up both framesso that they are of the same size and located right on top of each other (Top, Left, Width and Height properties must be the same)
Now put this code in:
Private Sub Command1_Click()
Frame1.Visible = True
Frame2.Visible = False
End Sub
Private Sub Command2_Click()
Frame1.Visible = False
Frame2.Visible = True
End Sub
Now each the first button shows the first frame while hiding the 2nd. The second button hides the first frame and shows the seconds. I think this is the simplest way to implement your task.
PS: don't forget to name your objects properly, it's not a good idea to have default names like Command1 or Frame2 - should be more descriptive than that.
It sounds like you are asking about the tabbed dialog control. To use a tabbed dialog control in VB6:
Click Project -> Components
Scroll down to "Microsoft Tabbed Dialog Control 6.0" and select it.
Click the Apply button.
You should notice a new control in the component tool box. If you do not see the toolbox, click View -> ToolBox. This is the same area of the IDE where you first click to add a button to a form. The tabbed dialog control looks like the top tab of several file folders. When you hover your mouse over the control in the toolbox, you will see a tool tip text of "SSTab". Click this control and then draw a rectangle on your form.
By default, this will add a tabbed dialog control with 3 tabs, but you can change this in the properties window. You can now create any control on top of a tab of the tabbed dialog control and interact with the control exactly the same way you would if the control was placed on the form itself.
What you want is called an MDI Form. It's a form that contains other forms.
You can find a full tutorial on them here, but here's the gist of what you want to do:
Set the "MDIChild" property of all your subforms you want to use to True. Disable their minimize, maximize, and resize functions as well.
Create an MDIForm. Disable its AutoShowChildren property.
Add a toolbar to the MDIForm. Add buttons to the toolbar corresponding to the forms you'll be switching between.
Implement each button's click event, to create child form as expected (or switch to an existing one).

Populate Numbers Pop-up Menu cell using AppleScript

I have a Numbers (iWork 09) spreadsheet where I want to be able to populate a Pop-up Menu cell with values to enable easy analysis of selected data.
I have the AppleScript to generate the values that I want put into the Pop-up Menu, but need a means of interacting with the Pop-up Menu's list of values.
Is it possible to use AppleScript to dynamically populate a Pop-up Menu cell?
If so, what is the code to populate the Pop-up Menu with options dynamically?
Applescript just automates what the application can already do on its own. So my question to you would be... can you populate that menu in Numbers? Of course Numbers populates the menu, but does Numbers give you the ability to determine what that menu holds. If not then there's no chance you can do it with applescript.
But you really don't need it. If you're running an applescript to generate the values then just popup a choose-from-list dialog box so you can choose the one you want to insert. Then after you choose one use applescript to insert the value into the currently selected cell in Numbers.

Excel - Open Multiple Windows and Tile on Sheet Tab Click

I'm trying to write a macro and I have the 2nd half done (tile windows showing specific sheets) but not sure how to do the first half.
There are some sheets that when displayed I would like to look at two other sheets at the same time (multiple window tiling). This is easy to set up manually, but I'd like it to happen automatically when I click on any of the 3 sheet tabs that are in the spreadsheet. There are other sheets that should be handled normally and have only 1 window open.
I'm thinking that I need to set up some sort of onClick event, but I haven't ran into it before in Excel and didn't see anything initially in Google.
Google figured it out once I rephrased my question. In VBA, select the Sheet object (not a module) and use this code:
Private Sub Worksheet_Activate()
'Your code goes here
End Sub
The code will be executed when the sheet is activated.
My reference: http://www.mrexcel.com/forum/showthread.php?t=71663

Resources