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
209 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
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 100 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA to copy paste columns form one file to other 20 88
I need help formating a date variable in my VB.Net application 2 52
vb6 connector to mongodb 2 84
Hide vba in gp 7 95
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

810 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