Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dim xxx As String & IF?
I am using CDO Mail to distribute reports. My script has been wroking great
and sends out multiple reports, however I now have to setup more that one distribution list... I already have logic that identifies what reports are being sent and want to use something similar to choose the distro list, but I don't know if using an IF statement is valid when defining a variable. Here's a snippet of the code I am trying to use: Dim SCType As String SCType = sh.Range("K6") Dim Distro As String If SCType = "WFSCScheduler" Then Distro = " Else: Distro = " End End If Yeah, I suppose I could put a formula in the sheet and define the distro that way, but I really hate to clutter up my sheets... Also, I may need to build additional distros, so additional Else/IF Statements may be necessary. What am I doing wrong? Thanks! Ray |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replace Hyperlink Addresses Help 'Dim OldStr As String, NewStr As String | Excel Programming | |||
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) | Excel Programming | |||
Importing Long String - String Manipulation (EDI EANCOM 96a) | Excel Programming | |||
to search for a string and affect data if it finds the string? | Excel Worksheet Functions | |||
Create a formula into a String then assign string to a cell | Excel Programming |