Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWAREProgramming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #31  
Old January 4th, 2007, 03:26 PM
Salchester Salchester is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 294 Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 23 h 37 m 7 sec
Reputation Power: 5
THANKS VERY MUCH!!! :-)

Works Brilliantly now!!!!

Now how do i extract a new field's data (Telephone) from the textbox?

The textbox now contains the following:

Bill has sent the following information:

Date: 12/12/06
Name: Bill
Age: 19


Telephone: 01453822665


Also, how can all this information be saved inside a text file, whilst allowing for certain pieces of information (i.e. Name, Date) to be reloaded and displayed in textboxes at a later date?

Many Thanks, much appreciated!

Reply With Quote
  Trader Rating: 0 · #32  
Old January 4th, 2007, 05:53 PM
Salchester Salchester is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 294 Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 23 h 37 m 7 sec
Reputation Power: 5
Cheers,

The program now works fine, only if there is no data in the Date field, the following error message appears:

Run-time error '5':

Invalid procedure call or argument

What can be done to the code, in order for it to except blank fields?

Many Thanks, much appreciated!!!! :-)

Last edited by Salchester : January 4th, 2007 at 06:56 PM.

Reply With Quote
  Trader Rating: 2 · #33  
Old January 4th, 2007, 07:05 PM
Nilpo's Avatar
Nilpo Nilpo is online now
Dev Hardware God (5000 - 5499 posts)
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,404 Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 3 Days 19 h 42 m 53 sec
Reputation Power: 6193
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
Quote:
Originally Posted by Salchester
Cheers,

The program now works fine, only if there is no data in the Date field, the following error message appears:

Run-time error '5':

Invalid procedure call or argument

What can be done to the code, in order for it to except blank fields?

Many Thanks, much appreciated!!!! :-)
Hrm.....illegal character perhaps?
__________________
Click the image if at any point you don't like my decision.

10011100011000101111100011100000011000000100000011 10010011011110110001101101011011110100011000001110 0100111101000100001

Visit Nilpo.com and Ask the Windows Guru!

Open me for some very useful links!    

Reply With Quote
  Trader Rating: 0 · #34  
Old January 4th, 2007, 07:12 PM
Salchester Salchester is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 294 Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 23 h 37 m 7 sec
Reputation Power: 5
Quote:
Originally Posted by Nilpo
Hrm.....illegal character perhaps?
Could be?, or is it just the fact that it doesn't like blank fields?

Is there anyway of putting two spaces " " inside the appropriate field, if the programs finds a blank field?

Many Thanks, much appreciated!

Last edited by Salchester : January 4th, 2007 at 07:16 PM.

Reply With Quote
  Trader Rating: 2 · #35  
Old January 5th, 2007, 08:45 AM
Nilpo's Avatar
Nilpo Nilpo is online now
Dev Hardware God (5000 - 5499 posts)
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,404 Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 3 Days 19 h 42 m 53 sec
Reputation Power: 6193
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
I'll add a little error check to handle the blank field.

Reply With Quote
  Trader Rating: 0 · #36  
Old January 5th, 2007, 08:47 AM
Salchester Salchester is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 294 Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 23 h 37 m 7 sec
Reputation Power: 5
Quote:
Originally Posted by Nilpo
I'll add a little error check to handle the blank field.
OK! Brilliant.

Many Thanks, much appreciated!

Reply With Quote
  Trader Rating: 0 · #37  
Old January 5th, 2007, 01:59 PM
Salchester Salchester is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 294 Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 23 h 37 m 7 sec
Reputation Power: 5
Quote:
Originally Posted by Nilpo
I'll add a little error check to handle the blank field.
Did you manage to add the error checking?

Many Thanks, much appreciated!

Reply With Quote
  Trader Rating: 2 · #38  
Old February 8th, 2007, 02:04 AM
Nilpo's Avatar
Nilpo Nilpo is online now
Dev Hardware God (5000 - 5499 posts)
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,404 Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 3 Days 19 h 42 m 53 sec
Reputation Power: 6193
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
I apologize for getting back so late. Here's the code including the error-check:

vb Code:
Original - vb Code
  1. Dim sText As String
  2. Dim sDate As String
  3. Dim sName As String
  4. Dim sAge As String
  5. Dim arrText() As String
  6. Dim count As Integer
  7.  
  8. sText = text1.text
  9.  
  10. ' Get line count
  11. count = InStr(sText, vbNewLine)
  12.  
  13. ' Size our dynamic array
  14. ReDim arrText(count)
  15.  
  16. ' Split our text string into an array housing individual lines
  17. arrText = Split(sText, vbNewLine, -1, 1)
  18.  
  19. ' Pull the last 3 strings from our array, ignoring any and all before it
  20. sName = arrText(Ubound(arrText) - 3)
  21. sDate = arrText(Ubound(arrText) - 2)
  22. sAge = arrText(Ubound(arrText) - 1)
  23.  
  24. ' Parse each line for ": " followed by data entry and reassign to our variable
  25.  
  26. If instr(sName, ": ") Then sName = Right(sName, Len(sName) - 4) Else sName = ": <blank>"
  27. If instr(sDate, ": ") Then sDate = Right(sDate, Len(sDate) - 4) Else sName = ": <blank>"
  28. If instr(sAge, ": ") Then sAge = Right(sAge, Len(sAge) - 3) Else sName = ": <blank>"

Reply With Quote
  Trader Rating: 2 · #39  
Old February 8th, 2007, 02:24 AM
Nilpo's Avatar
Nilpo Nilpo is online now
Dev Hardware God (5000 - 5499 posts)
 
Join Date: May 2004
Location: Salem, OH
Posts: 5,404 Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)Nilpo User rank is General 78th Grade (Above 100000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 1 Week 3 Days 19 h 42 m 53 sec
Reputation Power: 6193
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo Send a message via XFire to Nilpo
MySpace Orkut
If the code above doesn't work, it could be that you have blank lines before the Telephone field. We may have to account for that.

Reply With Quote
  Trader Rating: 0 · #40  
Old February 8th, 2007, 02:51 AM
Salchester Salchester is offline
Contributing User
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 294 Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level)Salchester User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 23 h 37 m 7 sec
Reputation Power: 5
Parsing Strings

Nilpo,

No Worries, I'll try it out later, when I'm on the correct machine.

I'm currently using the MAPI Control in my VB project, in order to load the email messages from my email application, into my program. Only, is there anyway of selecting a different folder for the messages to come from, instead of the Inbox folder?

Many Thanks, much appreciated!!!

Dale M. Piper
dddmmmppp@hotmail.com