DAO versus ADO. Hi, I wonder if it is possible to make Ms Excel move automatically without pressing Enter or Tab to the next cell once a certain number of digits is entered, for example, I'm using a barcode scanner to scan a barcode of 13 digits, so I want Excel to move to the next cell once the barcode is scanned. Values insert but only in the cells where there are some neighbors. Not in a rational VBA kind of way, but in how I was linking all of my cells (and sheets and books) and then using pivot tables, etc. how to select a specific cell in excel by using com object? - posted in Ask for Help: dear friends i have to work a lot on excel kindly tell me as i make f1 a hot key and now i want that every time when i press f1 key it should select cell no m10 every time moreover i want that next time when i press f1 hotkey it should select cell no m11 similarly next time when i press f1 hotkey it. This is especially useful when you have many sheets. Windows 10’s Snipping Tool has a new feature, called “Time Delay. Excel will move the carat to the next empty cell in your selection. Are you sure you're writing to the correct worksheet? Cells(i + 1, 1) = objSubFolder. This blog shows the various techniques within Excel Visual Basic for moving around and selecting cells relative to the active cell or selection. Once I enter name in given list I should be able to move cursor to other cell. They let you jump to another cell or sheet just by clicking a link in a cell. Press Enter 4. In the Direction tab: expand the options and select Right: Next, click OK. I currently have a standardized form, so I am trying to make every forms released to be the same. the While look to move the cell cursor. Now, go to the Editing options section and check the After pressing Enter, move selection box. Hi guys, I've an excel document with lots of dates in a row and when the sheet opens, i'd like to make it so it goes to the cell with todays date in it. This operation allows you to pinpoint all the cells that meet a certain condition. Trying to use Excel VBA code to move to a certain cell enter or change a formula, press enter, move to another cell in worksheet, enter or change a formula, press enter and etc. Send Mail With Link to a Workbook, From MS Outlook using Excel. Press the shortcut keys "Alt +F11" on the keyboard. Select Select a cell Cells(4, 5). These examples use the SelectionChange event of the Worksheet object. There are different ways to scroll through a worksheet. This will result in only the blank excel cells being highlighted, see below. Then click on “Insert Comment”. Selecting a Block of Cells using Range. Not in a rational VBA kind of way, but in how I was linking all of my cells (and sheets and books) and then using pivot tables, etc. Author(s) Terry Wickenden (Q) When I enter a textbox on the form, Access automatically selects all the text in that control. Any insights Saleem Tag: Move cursor to the end of cell for data entry; 15. In the past, I've always used a simple range ". The Wait option is optional. While recording a macro, try to use the Name box as much as possible to move the cursor to a specific cell. Instead understand that the Microsoft Excel object model and your vba code will be more professional, robust and mantainable if you don't select. Auto move cursor to specific cell with VBA code 1. Press Ctrl-G (or the F5 key) to launch the Go To dialog box, enter the address TX5000, and then press Enter. The standard way to do this is with the SelectionChange event. Are you unable to modify cells because they are locked? Here’s how to lock or unlock cells in Microsoft Excel 2016 and 2013. Excel typically displays forms in the center of the screen. It also shows how to unlock cells on a protected sheet by a password, or allow specific users to edit those cells without password. But hyperlinks have drawbacks. Excel VBA code to delete entire row if the cell is blank or empty or cell is 'xx' or cell contains 'xx'. so i found out another way to make sure the cursor move the next textbox which is by using 'setfocus. 0 Macro's are legacy functions from long ago before Excel VBA was introduced. But Kutools for Excel’s Import Pictures utility can help Excel users batch insert each picture/image into a single cell as below screenshot shown: Go to Download Free Trial 60 days Purchase PayPal / MyCommerce. I´m not sure how to move freely thru the excel sheet. The problem I have now is that if someone was to filter by something then the 'next cell down' could be hidden behind the filter (by that I mean it didn't meet the filter criteria). VBA move to cell based on other cell › Copy Multiple values from Drop list to single cell › Sheet 1 cell value (text in cell j:j) copy to sheet 2 if cel › Protect row when cell value is not equal to blank › Excel 2003 Macro-replace part of formula from value in cell. how to select a specific cell in excel by using com object? - posted in Ask for Help: dear friends i have to work a lot on excel kindly tell me as i make f1 a hot key and now i want that every time when i press f1 key it should select cell no m10 every time moreover i want that next time when i press f1 hotkey it should select cell no m11 similarly next time when i press f1 hotkey it. As an example, examine this code: Range("A1"). Carriage return while using remote scanner (Inventory Control) - posted in General Excel Problems and Solutions: Hello, I suspect I can accomplish my goal by either formatting cells and/or protecting worksheets or a combination of each but the means to do so escapes me. Auto-moving the cursor to specific cells How would I set up specific key combinations to automatically move the cursor to specifically designated cells? By way of example, I mean by hitting, say, CTRL+D while you are in cell A52 to jump the cursor immediately to B7, which would be the next starting point for the next column of data. Below I'm going to show you a line of VBA code that will not only eliminate those actions from being seen on the screen, but it will most likely increase the speed with which your macro runs. I came across an article on Microsoft’s web site, What happened to my favorite Excel 2003 Chart feature? Normally I just roll my eyes at these articles, but this one caught my attention, and I decided to address some of the items from the article. Can someone tell me what the code for that would be? When I add record the keystroke via moving the down arrow one cell down, it actually adds the cell reference, which is no good. Excel jumps from A1 across to H1, the rightmost cell in our data region. Like anything in Excel and VBA, there are many different ways to accomplish this. from A1 to B1, next time the button is pressed move the values from A1 to C1, next time is pressed from A1 to D1 and so on. Gregory' suggestion to alternate between Tab and Enter helps somewhat but I still have to alternate between the two keys. Another useful way to refer to a cell or group of cells is with the Offset property. There are other examples that you can jump to like a VBA timer like in the example here. We will use this property to select the range from the Active Cell to the last entry in a column. Line 13: Loop back to line 4 and repeat. e: Range(B1). Specially, while preparing reports or dashboards, we change the backgrounds to make it clean and get the professional look to our projects. Select Select a cell Cells(4, 5). Move cursor to specific cell by its absolute address: Range("C5"). Offset(1,0). Gregory' suggestion to alternate between Tab and Enter helps somewhat but I still have to alternate between the two keys. software-solutions-online. In the past, I've always used a simple range ". But what to do when you want to copy entire column or row? There is a Fill option in the Ribbon in Excel. Choosing the right method mostly depends on what your data looks like. These examples use the SelectionChange event of the Worksheet object. Now move the mouse cursor to cell B3, hold down the left button, and “drag” the highlight to cell B11. Loops will help us to repeat the same kind of task for specified cells until the condition is TRUE. Like anything in Excel and VBA, there are many different ways to accomplish this. If you want to quickly add multiple checkboxes in Excel, you can use the Fill handle to create multiple checkboxes based on one checkbox that has been created. Select all the cells of a worksheet Cells. Keeping the SHIFT button pressed, move the cursor to the last cell (bottom-right) of the range. Press Enter 4. Your program then fails, or returns inaccurate results. Below are a few examples to copy and move files and folders. For the following worksheet: (Note we can start with any cell in the worksheet selected). Auto move cursor to specific cell with VBA code 1. 0 Jan 26, 2009 at 11:35 AM | 26 Views I use a routine like this to post movements in R/3 (This is an example for MB1A Transaction) based on information posted on a excel spreadsheet + VBA and seudo-code created with SM35 transaction. If you've been given good help, use the icon below to give reputation feedback, it is appreciated. The first was a small piece of VBA code to import the named formulas into Excel from a range of worksheet formulas. Macro to clean and trim data. The Excel VBA Offset Property. It is the position of the active cell that is important here. Moving non-adjacent columns & rows is not possible in excel which means we can only swap or move the columns which are side by side to one another. Word VBA, Move Cursor to End of Line If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. By default, when the user selects a cell, Excel highlights the row and column by changing the color of the associated row and column headers. Excel VBA Consolidate worksheets into one worksheet. This will include areas past any blank rows and columns. End(xlDown). A combo box combines a text box with a list box to create a drop-down list. Below are the keyboard shortcut keys that can be used to make. Free VBA macros for Microsoft ® Outlook ®. The standard way to do this is with the SelectionChange event. Now Fill Empty Cells In Excel Using Equals Up Arrow. This panel can be used to execute immediately pieces of code (even your code is paused). My question is I want to move the cursor to a different cell based on the value on another cell. You could replace the word select with Copy or one of many other commands. VBA Lesson 2-6: VBA for Excel for the Cells, Rows and Columns. This is usually fine for data entry and dialog forms. These are stored as Long integers. If you want to find cells with certain I type Ctrl+End and the cursor jumps down to. Excel VBA Row & Region Selection Tips Page 6 PTR associates Limited www. In this video I show you and explain how to move the mouse cursor automatically and periodically with an Excel Visual Basic macro. Move your mouse cursor to the far right of the cell until it changes to a four-headed arrow. An Excel program can contain several open Workbooks. (Don’t worry if it looks like you’ve shifted cells up or down. That way, if you move the cell or range later, the macro will go to its new location rather than the old location. Most of the traps yield no syntax error; they are bugs lying dormant in your code until particular conditions are met. If you move to the cell below and start typing exactly the same thing, Excel notices this and autocompletes it for you. count or sum cells in Excel based on cell background color. (I have a series of buttons down the page, each will run the same macro / do the same thing, but starting from a different location each time - i. Press your right mouse button and drag the column to the right. This would not move your cursor down to the next cell. Sometimes you need to move your cursor around your worksheet to re-position it before running the next step of a macro. A menu will pop up. For any Excel super-user learning to use VBA and the Visual Basic environment is an essential step towards getting the most functionality from the most. Then click on “Insert Comment”. In an Excel worksheet, there will certainly be a lot of data and information. Select cells in an Excel range by complex criteria ( wildcard ) Select cells by complex criteria from a range. Description: It is an interesting feature in excel, we can change background color of Cell, Range in Excel VBA. Problem: I learned in " Automatically Move the Cell Pointer in a Direction After Entering a Number" how to. He says: First I found a bug. Auto move to next right cell after 4-digit inputting without press Enter key with VBA. The VBA code also moves the view so cell A1 is the upper left cell on all sheets. There are certain things we need to remember for using the move column command in excel. For versions of Excel lower than 2007: the number of colors is limited (the closest available color to the RGB values will be used). Using keyboard shortcuts. Move your cursor to cell D4 5. - in your VBA editor, right click on the project => insert => form then from the toolbox, select the button, and add it to the form, then assign to a macro => then add a button to show the form using the VBA: Userform1. Jump to Any Cell / Worksheet using Name Box If you want to quickly jump to a named range or another worksheet, here is a quick trick. How can I change the position of the active cell (or raise the value with one) in Excel If you Google "Excel VBA delete last few columnOffset:=0). Excel Problem: If I type a number and then press a direction arrow key, Excel will enter the number and move the cell pointer in the direction of the arrow key. Below is an example of moving the mouse to the top left of the screen and then clicking. The features of PI covered in this manual include: activating PI DataLink in Excel, adding PI tags and values to Excel, creating new displays in PI, and trending data in PI ProcessBook. Copy Method to copy worksheet. Excel will then create the standard deviation for the column of data in cell B11. The code before it is code used to supply sample data. Auto-moving the cursor to specific cells How would I set up specific key combinations to automatically move the cursor to specifically designated cells? By way of example, I mean by hitting, say, CTRL+D while you are in cell A52 to jump the cursor immediately to B7, which would be the next starting point for the next column of data. Some features of Microsoft Excel pertaining to PI are also covered to provide ease of access and additional utilization. They are still available, but can only be used with a defined name and not as a regular worksheet function. Move cursor to specific cell by its absolute address: Range("C5"). docx VBA4-Using Cell Formulas in VBA First, youll use the WHILE-WEND and FOR…NEXT loop commands to repeat your processing for all the rows in your data file. In this case no matter what is the height and width of the cell in the worksheet, your picture will be always placed at a specific location. How to quickly move the cursor to the Excel sheet cells. I just wish that I only need to press one key to move between cells automatically with the pattern I want. "Excel/VBA for Creative Problem Solving, Part 1" is aimed at learners who are seeking to augment, expand, optimize, and increase the efficiency of their Excel spreadsheet skills by tapping into the powerful programming, automation, and customization capabilities available with Visual Basic for Applications (VBA). More specifically record a macro and record it in absolute sense not relative. When you have a big vba macro / code which needs to run for many minutes, you can change the cursor to the hourglass or waiting cursor (based on your system setting) for the period when the macro is running. Auto move cursor to specific cell with VBA code 1. This example illustrates the End property of the Range object in Excel VBA. Below are a few examples to copy and move files and folders. Excel 2016 offers a wide variety of keystrokes for moving the cell cursor to a new cell. This program will run in Microsoft Excel 2007 2010 and 2013. Hi!, Is there any way through VB code I could get the cursor to be on cell A1 when I open the excel file. When terminating a called procedure, I frequently want to leave the cursor on a specific cell. Get the address of ActiveCell: 9. How to select cells/ranges by using Visual Basic procedures in Excel. Select ActiveCell and cells to its Right: 12. However, if I am using the numeric keypad, it is much more convenient to use the Enter key on the numeric keypad than to use the arrow keys. Now, you're writing to worksheet cells in a loop, while keeping Excel relatively responsive. Name Cells(i + 1, 2) = objSubFolder. Sometimes, we need to get a row number of the current active cell. Simple than that. I came across an article on Microsoft’s web site, What happened to my favorite Excel 2003 Chart feature? Normally I just roll my eyes at these articles, but this one caught my attention, and I decided to address some of the items from the article. Continuous range of cells that contains data around the selection (including the selection) is termed as current region. Select End Sub Sub Left(). The code that finds and selects the cell is near the bottom. The purpose of this project is to help with your VBA and general Excel skills in basic application development. I have used this code to find the first blank cell in column A…i need to find the first blank cell in Column F or others. There are lots of methods available for removing any extra spaces found in our data. Click and hold on the fill handle and drag to the right (or down) to fill in the other cells. Finding a range’s screen coordinates is tricky. example: I'm In cell A1, this code appeared after scanning "AABB1234567CC", I want Excel to. Excel will move the carat to the next empty cell in your selection. a form to get the cursor to move to the next control after I press the. The ability to use numeric values for parameters is particularly useful if you need to loop through rows or columns. Tagged: Excel, Office, Restricting Cursor Movement to Input Cells. Write a macro that recalculates the selected cell(s) when a new selection is made. Next, I want to simply do a down cursor to get to the first blank cell. In the new menu, move your cursor on the option "Insert". Start = 14672. While I am opening it should set focus on D4. Excel 97 thru 2007. Finding a range's screen coordinates is tricky. By Greg Harvey. I have old EXTRA! VBA macros that I've written that I wish to produce for Reflections. Automatically Run Macro when Cell Changes Posted on November 11, 2010 by andrew walker in Excel 2003 Help , Excel 2007 Help , Excel 2010 Help , Excel VBA , Macros with 36 Comments Sometimes it is necessary to have a macro run when the contents of a specific cell changes. Selection and ActiveCell. Right-click on that icon, and left-click to select the View Code menu item. However, if you are working with a cell that you want to have more than one line of text, it can be frustrating to create a new line. The second was a small VBA code to add the 16 series to the Chart with all the details once again sourced from a worksheet Formulas. For one file you can use the VBA Name and FileCopy function and for entire folders or a lot of files use the other macro example's on this page. Not in a rational VBA kind of way, but in how I was linking all of my cells (and sheets and books) and then using pivot tables, etc. unsolved Mouse cursor jumps when moving over certain things submitted 6 months ago by Lick_A_Brick Some people here in the office have a issue where the mouse cursor will jump outside of the column name when wanting to adjust the width. It appears the arrow keys are controlling where. Move your mouse cursor to the far right of the cell until it changes to a four-headed arrow. If you don't already have a spreadsheet, you will need to create one with random numbers. Enable or disable Edit mode. An Excel program can contain several open Workbooks. In this article we first start of by making a simple bar chart embedded in a chart sheet and then use the mouse move event of the chart sheet to make it interactive. I first show you how to create a message box that displays a simple message, and then we expand on this to include “YES” & “NO” buttons and perform an action based on the selected button. This tip shares multiple ways to highlight the row and column in more obvious ways as well as a way to highlight the cell in a specific column in the same row. Looking for help on VBA code in Excel 2013 that will filter field items in a pivot table filter. Three ways to. VBA can use the active call in calculations, etc, and VBA can also be used to change the active cell to a different cell. In my earlier post, I had written about VLookUp in Excel. You can capture the selection-change, double-click and right-click events, but not simply the mouse-move event (nor the scroll event). It is a custom version of the venerable Visual Basic programming language that has powered Microsoft Excel's macros since the mid-1990s. Microsoft Office Excel 2010 offers a variety of keyboard shortcuts for selecting a new cell. Moving non-adjacent columns & rows is not possible in excel which means we can only swap or move the columns which are side by side to one another. Auto move to next right cell after 4-digit inputting without press Enter key with VBA. The latter is often considered unfeasible, but in fact there's a tool that allows moving non-adjacent columns in Excel 2016, 2013 and 2010 in a click. i) Carefully notice the formulas in F column. This macro is different from regular macros, it is executed when something happens, Microsoft calls this an Event. Excel will move the cursor from column to column until you reach the right-most column in the selection. This would not move your cursor down to the next cell. Here's a typical scenario: your code modifying a workbook fails because the user types something into a cell. Sub Down() ActiveCell. For any Excel super-user learning to use VBA and the Visual Basic environment is an essential step towards getting the most functionality from the most. For example, when you enter 'Range(' to begin a line of code that will select a range of cells on the worksheet, VBA will display a small box next to your cursor telling the correct format to complete the argument. Here's how to do the same thing in spreadsheet cells. The macro allows to interact with web page controls (text fields and buttons). Copying or moving the contents of a cell or range; 'Select a specific cell and enter value. values as contents of a cell. Example I enter data into cell B6, when I press enter I would like the cursor to move to either C7 or B8 depending if there is a number in cell B7. Problem: I learned in " Automatically Move the Cell Pointer in a Direction After Entering a Number" how to. Supriyo asked if there is a mouse event handler in VBA. Thus, you have inserted a new module into the file. It appears the arrow keys are controlling where. Assume that you will be adding more sales figures over time. Moving on the sheet cells is carried out with the help of the cursor (controlled black rectangle). This page is an advertiser-supported excerpt of the book, Power Excel 2010-2013 from MrExcel - 567 Excel Mysteries Solved. Select the cells you wish to modify. But we do have the solution if we turn to VBA and write few lines of code. Hyperlinks are handy. You can use the SendKeys method in your VBA code, to simulate keystrokes that you would manually input in the active window. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window. VBA can use the active call in calculations, etc, and VBA can also be used to change the active cell to a different cell. If you want to over ride this this you can do so with a small piece of VBA code. In the Microsoft Visual Basic for Applications window, double click T hisWorkbook in 3. Jump to Any Cell / Worksheet using Name Box If you want to quickly jump to a named range or another worksheet, here is a quick trick. There are other ways to do this natively in Excel using a combination of shortcuts. Column A is scrolled off the left side of the window. 1 How to Move Cursor Inside a Cell with Keyboard in Excel. Rows Method The following example sets an object variable to the used area of a worksheet. My question is I want to move the cursor to a different cell based on the value on another cell. cell D2 in the picture below;. Here you can also use the VBA codes to fulfill the task. Free VBA macros for Microsoft ® Outlook ®. If I move my cursor to a cell outside the table, I am able to click the sub total button. He wants a value inserted in a cell when that cell is clicked on. Also, the arrow keys behave somewhat differently when Excel is in Edit mode. Activate" to. Case 1: Delete entire row, if cell is empty The macro checks the cell value, if it is empty or blank, then it deletes the entire row, else the cursor moves to the cell in the next row. It is the position of the active cell that is important here. How to automatically move cursor to specific cell in Excel? Extendoffice. This will typically be in instances where you are using a modeless (floating) userform. Line 13: Loop back to line 4 and repeat. Selected cells have a dark black border around them, and their contents are also displayed in the program's formula bar above the spreadsheet grid. But what to do when you want to copy entire column or row? There is a Fill option in the Ribbon in Excel. Jump to Any Cell / Worksheet using Name Box If you want to quickly jump to a named range or another worksheet, here is a quick trick. Macro to clean and trim data. The spreadsheet cell outlined with the cursor is called the active cell in VBA. They are still available, but can only be used with a defined name and not as a regular worksheet function. show the worst imaginable solution is to move buttons with VBA just don't go down that route ». A menu will pop up. Actually, the macro says move down one row and stay in the same column. Situation: Some sales figures in column A. Selecting a Block of Cells using Range. In VBA macros, you can use the CurrentRegion property to expand a selection to include the current region. Instead of cutting and pasting you may prefer to just move the data to a new location. com Auto move cursor to specific cell with VBA code. Auto move to next right cell after 4-digit inputting without press Enter key with VBA. The mouse cursor remains as a white plus sign whenever the cursor is located over a cell in any of the program's rows or columns. Auto fill 4-digit series with Kutools for Excel. How to set the cursor at the end of a textbox after it was SetFocus'ed?. Re: Move cursor to specific cell after Enter whether or not data's input, in protected she There is no built-in event that fires any time you are in a cell and do nothing else except hit ENTER. For the following worksheet: (Note we can start with any cell in the worksheet selected). When you click on a cell it becomes the active cell. Description: It is an interesting feature in excel, we can change background color of Cell, Range in Excel VBA. They let you jump to another cell or sheet just by clicking a link in a cell. Worksheets(i - 1). He says: First I found a bug. The same technique can also be used to move columns in Excel. Sometimes, we need to get a row number of the current active cell. Also please visit my website www. For one file you can use the VBA Name and FileCopy function and for entire folders or a lot of files use the other macro example's on this page. Actually, the macro says move down one row and stay in the same column. Hello, I need to select a cell at the left side of the active cell using an offset, as Im working with dynamic ranges. This Excel VBA macro sets all shapes properties to the move and size with cells. An event macro has a designated name and must be placed in the sheet module or worksheet module. The macro allows to interact with web page controls (text fields and buttons). Choosing the right method mostly depends on what your data looks like. While recording a macro, try to use the Name box as much as possible to move the cursor to a specific cell. As an example, let's say that you wanted cell B5 to contain the value 10 whenever that cell is selected. GoTo can be used to scroll to a specific location in Excel sheet. In section 2 you will learn all the VBA vocabulary that is essential to work with business data (accounting, sales, production and others). I currently have a standardized form, so I am trying to make every forms released to be the same. Insert a new worksheet into the workbook 3. When terminating a called procedure, I frequently want to leave the cursor on a specific cell. the Funcion with Cursor is the part I couldn't do. Another useful way to refer to a cell or group of cells is with the Offset property. The same technique can also be used to move columns in Excel. I first show you how to create a message box that displays a simple message, and then we expand on this to include "YES" & "NO" buttons and perform an action based on the selected button. Wrapping Text in Excel. Finding the last used row, column, or cell is one very common task when writing macros and VBA applications. But sometimes you need to move to any remote cells. Description: It is an interesting feature in excel, we can change background color of Cell, Range in Excel VBA. This post provides a complete guide to using the Excel VBA Find function. Three ways to. Excel typically displays forms in the center of the screen. When you enter information in a cell, and then press the Enter key, Excel normally moves to the cell below the one in which you entered the information. After the Format cells window open, press on the Protection option and click on the Locked option. Some features of Microsoft Excel pertaining to PI are also covered to provide ease of access and additional utilization. Type your name and press the Enter key 6. Please suggest vba code for the same. Microsoft Access / VBA Forums on Bytes. Hi Jeff, Thank you for your reply. Excel 97 thru 2007. When I return to excel thousands and thousands of cells are blue. Excel VBA SendKeys "into" VBIDE - moving the Cursor within the modue sType = Cells(iRow, 3): sFunction = Cells(iRow, 4) Any other suggestions for moving the. The blog includes a discussion of the Offset, End, Resize, Range, EntireRow, EntireColumn and CurrentRegion methods. Move from sheet 2 to sheet 4 8. Right-click on that icon, and left-click to select the View Code menu item. Where-as on hitting the Enter key on Sheet2, the next cell selected will be below the active cell. Press Enter 4. I want to do Find SendKeys is an Application Method, but when you use it against the VBIDE it errors even if the "Module" is active at that time. Select ActiveCell and cells to its Right: 12. Ofcourse, I will tell you the VBA code which can be used to enable or disable the Cell Drag and Drop” option in Excel. current cell position in microsoft excel so as to enter text. This isn't always what you want though, so you can press enter to accept the autocompletion or just carry on typing your data. Use the Table of Contents on the right to navigate. Cells(1, 1). What This VBA Code Does. Click it and drag the selection in the direction of your choice When a control has been selected, as your mouse moves over it, its pointer displays a different cursor. I really wish we had a formula or a feature that does it for us but it isn't available yet. Most of the traps yield no syntax error; they are bugs lying dormant in your code until particular conditions are met. In the “Cells” area, select “Format” > “Format Cells“.