Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi folks,
When I ran the following code, I got run-time error 13. Type mismatch. Could anyone tell me how to fix it? If Evaluate("'" & strFolder & "[" & strFile & "]" & "Data" & "'!C8") = "" Then .Value = "" Else .Value = "='" & strFolder & "[" & strFile & "]" & "Data" & "'!C8" .Value = .Value End If Thanks in advance. Tim. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Evaluate doesn't work with closed workbooks.
The IF test has to be in the Formula you put in the cell. -- Regards, Tom Ogilvy "Tim" wrote in message ... Hi folks, When I ran the following code, I got "run-time error '13'. Type mismatch" .. Could anyone tell me how to fix it? If Evaluate("'" & strFolder & "[" & strFile & "]" & "Data" & "'!C8") = "" Then .Value = "" Else .Value = "='" & strFolder & "[" & strFile & "]" & "Data" & "'!C8" .Value = .Value End If Thanks in advance. Tim. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Could you show me the code? Thanks. Tim. "Tom Ogilvy" wrote: Evaluate doesn't work with closed workbooks. The IF test has to be in the Formula you put in the cell. -- Regards, Tom Ogilvy "Tim" wrote in message ... Hi folks, When I ran the following code, I got "run-time error '13'. Type mismatch" .. Could anyone tell me how to fix it? If Evaluate("'" & strFolder & "[" & strFile & "]" & "Data" & "'!C8") = "" Then .Value = "" Else .Value = "='" & strFolder & "[" & strFile & "]" & "Data" & "'!C8" .Value = .Value End If Thanks in advance. Tim. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
end result
=if(A1="","",A1) so ActiveCell.Formula = "=if(A1="""","""",A1)" Obviously you would replace A1 with the string you are building. -- Regards, Tom Ogilvy "Tim" wrote in message ... Hi Tom, Could you show me the code? Thanks. Tim. "Tom Ogilvy" wrote: Evaluate doesn't work with closed workbooks. The IF test has to be in the Formula you put in the cell. -- Regards, Tom Ogilvy "Tim" wrote in message ... Hi folks, When I ran the following code, I got "run-time error '13'. Type mismatch" .. Could anyone tell me how to fix it? If Evaluate("'" & strFolder & "[" & strFile & "]" & "Data" & "'!C8") = "" Then .Value = "" Else .Value = "='" & strFolder & "[" & strFile & "]" & "Data" & "'!C8" .Value = .Value End If Thanks in advance. Tim. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
Application Run Time Error 1004 and Stack Error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |