Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I use Send Keys to mimic pressing F2, then holding down SHIFT and CTRL together while pressing ENTER

Posted on 2006-10-29
3
Medium Priority
?
216 Views
Last Modified: 2008-03-17
Before I do the above I need to select a particular cell holding a function in an Excel worksheet.
0
Comment
Question by:TimHudspith
3 Comments
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 1200 total points
ID: 17829352
Why bother doing this?  Excel offers the FormulaArray property for a Range object; the only tricky part about
it is that your code has to use an R1C1-style reference and not an A1-style ref, but that is not a big deal.

Ultimately, what do you really need to do?

Patrick
0
 
LVL 32

Assisted Solution

by:Robberbaron (robr)
Robberbaron (robr) earned 300 total points
ID: 17832169
based upon what Patrick has shown....

1/ Put the following code in a VBA module.

Sub MakeArrayFormula()

    x = ActiveCell.FormulaR1C1
    ActiveCell.FormulaArray = x  
End Sub


2/ select the desired cell. Tools / Macro / Run / MakeArrayFormula / Run

works and doesnt change formula reference style.

3/ you can cerate a QuickKey combination. Tools / Macro / Run / MakeArrayFormula / Options / Ctrl -Z for example.
0
 

Author Comment

by:TimHudspith
ID: 17848478
matthewsPatrick - I have to admit I didn't really know what I was dealing with. Since you mentioned FormulaArray I've done some reading on it and have now worked out how to accomplish this using the FormulaArray property.  Thanks.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question