Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set the state of a cell to edit??

Status
Not open for further replies.

GSMike

Programmer
Feb 7, 2001
143
US
Is there a way to do that?
I am trying to help the user enter a function that is in their Personal workbook. When we use the Insert>Function>User Defined Fuctions...method, we get weird stuff going on, since there's an InputBox in the function. You have to answer the input box like 6 times when you use that interface.
So what I would like to do is create a shortcut key that enters "=Personal.xls!MyFunction(" in the cell and leaves the cell in edit mode, so the user can then type in or select the cell that is used as a parameter for the function.
I've been trying:
Code:
ActiveCell = "'=Personal.XLS!quincy("
ActiveCell = Right(ActiveCell.Value, Len(ActiveCell.Value) - 1)
, etcetc
But obviously none of this works.
Here's the function in question, in case that will help you see what I'm trying to do.
Code:
Function Quincy(x As Range)
If ActiveWindow.RangeSelection.Cells.Count = 1 Then
    Prefix = InputBox("Please enter the prefix you want added to the selected cell value.", "The Quincy Prefix Function", "66")
End If
Quincy = Prefix & CStr(x)
End Function
Thank you for your help!
Mike :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top