• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need Some Help with Visual Basics and Sub Functions !!!

leeland

Diamond Member
i am trying to do a program for school and it deals with a mail delivery system and if it is on a city grid of avenues and streets. I want to do it with if statements for the problem tree

first i have cut up the address into varibles and i am testing to see if it is a street or an avenue...i am fine until here....once i am in the decision tree and get to if it is either a street or an avenue i am calling another sub function inside the function to decide weather it is a street or avenue...it looks like this


Private Sub AvenueOrStreet(RoadType As String, BuildingNumber As Single, StreetOrAvenueNumber As Single)
If RoadType = "Street" Then

Call AvenueDeliiveryLocation(BuildingNumber, StreetOrAvenueNumber)
Else

Call StreetDeliveryLocation(BuildingNumber, StreetOrAvenueNumber)

End If

End Sub

i am sending the first sub function roadtype, building number and street or ave number....it is only going to be a street or ave so that is why i only used one if statement....but it gives me an error that says

sub or function not defined Call AvenueDeliiveryLocation...i really don't know why it is doing this ???

if anyone can give a little insight to this problem i would be all ears !!!!

thanks in advance

leeland
 
thanks for the reply
i fiqured it out....basically....i named them wrong...and i don'tk now if this is right but they were private and i changed the names and make them public

so i got it to work, now it is the logic that is a b!tch

thanks again

leeland
 
Back
Top