Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inputbox question
I have an input box in the beginning of my macro that ask
for a string to be entered into a cell B2. Then copied down. But i'm getting a #NAME? error in the cells. Here is the code i am using. Dim DSName As String DSName = InputBox("Enter todays Portfolio Name") Range("B2").Select ActiveCell.FormulaR1C1 = "=IF(RC[-1]="""","""",DSName)" Any suggestions? Thank You. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inputbox question
Nancy,
Untested, but try Dim DSName As String DSName = InputBox("Enter todays Portfolio Name") Range("B2").Select ActiveCell.FormulaR1C1 = "=IF(RC[-1]="""",""""," & DSName & ")" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Nancy" wrote in message ... I have an input box in the beginning of my macro that ask for a string to be entered into a cell B2. Then copied down. But i'm getting a #NAME? error in the cells. Here is the code i am using. Dim DSName As String DSName = InputBox("Enter todays Portfolio Name") Range("B2").Select ActiveCell.FormulaR1C1 = "=IF(RC[-1]="""","""",DSName)" Any suggestions? Thank You. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inputbox question
I tried your code, but got the same error message. any
other suggestions? tks. -----Original Message----- Nancy, Untested, but try Dim DSName As String DSName = InputBox("Enter todays Portfolio Name") Range("B2").Select ActiveCell.FormulaR1C1 = "=IF(RC[-1]="""",""""," & DSName & ")" -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Nancy" wrote in message ... I have an input box in the beginning of my macro that ask for a string to be entered into a cell B2. Then copied down. But i'm getting a #NAME? error in the cells. Here is the code i am using. Dim DSName As String DSName = InputBox("Enter todays Portfolio Name") Range("B2").Select ActiveCell.FormulaR1C1 = "=IF(RC[-1] ="""","""",DSName)" Any suggestions? Thank You. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inputbox question
ActiveCell.FormulaR1C1 = "=IF(RC[-1]="""","""",""" & DSName & """)"
Tested using Excel 97SR2 on Windows 98SE, HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- I tried your code, but got the same error message. any other suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
InputBox / VBA question ok = print, cancel = exit | Excel Worksheet Functions | |||
Another InputBox question... | Excel Discussion (Misc queries) | |||
inputbox question | Excel Discussion (Misc queries) | |||
Application.Inputbox Question | Excel Programming | |||
InputBox to get user hidden columns question | Excel Programming |