Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,387 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,215 people online right now. Registration is fast and FREE... Join Now!




How do I change one value to another

 
Reply to this topicStart new topic

How do I change one value to another

ALT
post 29 Aug, 2008 - 12:53 PM
Post #1


New D.I.C Head

*
Joined: 29 Aug, 2008
Posts: 2

I have a text file that I need to change a value, ex. 5, to a new value, ex. Lakeview Elementary School. I am very new to VB and am not sure where I went wrong (or if anyof it is even right:)



CODE

'**********************************************************************
'  Visual Basic Transformation Script
'************************************************************************
Function Main()

    dim Schlid
              dim SName

Schlid =  DTSSource("Col07")
    
    DTSDestination("Col07") = SName
    

Select Case Schlid
Case=5
              SName=Lakeview Elementary School
Case=6
              SName=Stocktrial Elementary School
Case=7
              SName=Hillcrest Elementary School
Case=8
              SName=Meadowlark Elementary School
Case=9
              SName=Wagonwheel Elementary School
Case=10
              SName=Conestoga Elementary School
Case=11
              SName=Rawhide Elementary School
Case=12
              SName=Paintbrush Elementary School
Case=14
              SName=Sunflower Elementary School
Case=15
              SName=Pronghorn Elementary School
Case=20
              SName=Little Powder School
Case=22
              SName=Recluse School
Case=23
              SName=Rozet Elementary School
Case=26
              SName=Cottonwood Elementary School
Case=31
              SName=4-J School
Case=101
              SName=Sage Valley Junior High School
Case=102
              SName=Twin Spruce Junior High School
Case=150
              SName=Wright Junior Senior High School
Case=151
              SName=Campbell County High School
Case=152
              SName=Westwood High School

    Main = DTSTransformStat_OK
End Function
User is offlineProfile CardPM

Go to the top of the page

jeff223
post 29 Aug, 2008 - 04:29 PM
Post #2


New D.I.C Head

*
Joined: 24 Aug, 2008
Posts: 3

None of this makes absolutely any sense to me :-/
User is offlineProfile CardPM

Go to the top of the page

ALT
post 29 Aug, 2008 - 04:54 PM
Post #3


New D.I.C Head

*
Joined: 29 Aug, 2008
Posts: 2

Thank you.....I think I have it figured out. I took out the '=' sign and added '"' around the text and ended my select and it works.

Thank you again.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 06:59AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month