RichardOneil
MIS
Hi-
This is a finesse question. I have code that pulls data from our hr database and writes it to a text file so that if can imported into a scheduling system. Due to a number of factors, I can't pull by corp/dept, I have to pull the data by a change date and then filter out only those records that will be loaded into the scheduling system. Our corporation has hundreds of depts, but only about 50-60 depts will be put be using the scheduling system.
I ended using a Case Statement:
Send = 0
Select Case DeptNo
Case "20.6010"
Send = 1
Case "30.6010"
Send = 1
End Select
If Send = 1 Then
*Code for Sending data to File
End If
I'm pretty much a self-taught newb when it comes to VBA and I am wondering if there is a more efficient/elegant way of accomplishing this? Thanks for the input.
This is a finesse question. I have code that pulls data from our hr database and writes it to a text file so that if can imported into a scheduling system. Due to a number of factors, I can't pull by corp/dept, I have to pull the data by a change date and then filter out only those records that will be loaded into the scheduling system. Our corporation has hundreds of depts, but only about 50-60 depts will be put be using the scheduling system.
I ended using a Case Statement:
Send = 0
Select Case DeptNo
Case "20.6010"
Send = 1
Case "30.6010"
Send = 1
End Select
If Send = 1 Then
*Code for Sending data to File
End If
I'm pretty much a self-taught newb when it comes to VBA and I am wondering if there is a more efficient/elegant way of accomplishing this? Thanks for the input.