I'm getting a
Run-time Error'13';
Type mismatch
on the below piese of code. Is there somthing wrong with the synthax?
![]()
Please Login or Register to view this content.
I'm getting a
Run-time Error'13';
Type mismatch
on the below piese of code. Is there somthing wrong with the synthax?
![]()
Please Login or Register to view this content.
It should be
![]()
Please Login or Register to view this content.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
Your a gentleman! Thank you for your promt responce!
Hi TonyforVBA
I suggest that when testing your variable against multiple results you use Select Case instead of multiple If type statements
Using Select Case is easier to write, read and much faster to execute as file_name is checked eachtime it is refered to
Select Case = 1 times
If with multiple OR = 4 times in your posted code
Select Case file_name
Case "corporarate", "Corporate ROI"
Application.Run "'Formatting marco for Lists - Group Leader.xls'!Region_Branch_Name_List"
Case Else
Application.Run "'Formatting marco for Lists - Other.xls'!Region_Branch_Name_List_Formatting_Macro"
End Select
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks