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
207 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 92

Accepted Solution

by:
Patrick Matthews earned 400 total points
Comment Utility
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 100 total points
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now