Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default (ADO)Getting data from access database Memo field

Nigel
It works good except it leaves off the last part of the string
"Safe Fund- 300.00"
Any ideas

"Nigel" wrote:

One solution......

Sub FillList()
Dim sT As String, sO As String
Dim iC As Integer

sT = "Tax-82.54 Disc-0 Online-206.50
Instant-503.00€¡CC-146€¡€¡Visa-139.14€¡MC-€¡Debit-187.26€¡€¡PM-3.00€¡RJR-€¡Lor-€¡S&M-€¡USST-7.00€¡Other-€¡Total
Coupons-10.00€¡Safe Fund- 300.00"

With Sheets("Sheet1").ListBox1
.Clear
For iC = 1 To Len(Trim(sT))
If Asc(Mid(sT, iC, 1)) < 135 Then
sO = sO + Mid(sT, iC, 1)
Else
.AddItem sO
sO = ""
End If
Next
End With
End Sub

--

Regards,
Nigel




"Mike" wrote in message
...
Tax-82.54 Disc-0 Online-206.50
Instant-503.00€¡CC-146€¡€¡Visa-139.14€¡MC-€¡Debit-187.26€¡€¡PM-3.00€¡RJR-€¡Lor-€¡S&M-€¡USST-7.00€¡Other-€¡Total
Coupons-10.00€¡Safe Fund- 300.00

I need to take the string above and break it up to look like this below
Im trying to put this into a multiline textbox. Im guessing the cross
looking things are the enterkey. Some single and some double in this
example.
There could be more then that in the database.
If someone could help me i would appreciate it.

Tax-82.54 Disc-0 Online-206.50 Instant-503.00
CC-146

Visa-139.14
MC-
Debit-187.26

PM-3.00
RJR-
Lor-
S&M-
USST-7.00
Other-
Total Coupons-10.00



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default (ADO)Getting data from access database Memo field

Oops, add the line (third from bottom) to fix that.

Sub FillList
With Sheets("Sheet1").ListBox1
.Clear
For iC = 1 To Len(Trim(sT))
If Asc(Mid(sT, iC, 1)) < 135 Then
sO = sO + Mid(sT, iC, 1)
Else
.AddItem sO
sO = ""
End If
Next
If Len(Trim(sO)) 0 then .additem sO '< this line to fix
End With
End Sub


--

Regards,
Nigel




"Mike" wrote in message
...
Nigel
It works good except it leaves off the last part of the string
"Safe Fund- 300.00"
Any ideas

"Nigel" wrote:

One solution......

Sub FillList()
Dim sT As String, sO As String
Dim iC As Integer

sT = "Tax-82.54 Disc-0 Online-206.50
Instant-503.00€¡CC-146€¡€¡Visa-139.14€¡MC-€¡Debit-187.26€¡€¡PM-3.00€¡RJR-€¡Lor-€¡S&M-€¡USST-7.00€¡Other-€¡Total
Coupons-10.00€¡Safe Fund- 300.00"

With Sheets("Sheet1").ListBox1
.Clear
For iC = 1 To Len(Trim(sT))
If Asc(Mid(sT, iC, 1)) < 135 Then
sO = sO + Mid(sT, iC, 1)
Else
.AddItem sO
sO = ""
End If
Next
End With
End Sub

--

Regards,
Nigel




"Mike" wrote in message
...
Tax-82.54 Disc-0 Online-206.50
Instant-503.00€¡CC-146€¡€¡Visa-139.14€¡MC-€¡Debit-187.26€¡€¡PM-3.00€¡RJR-€¡Lor-€¡S&M-€¡USST-7.00€¡Other-€¡Total
Coupons-10.00€¡Safe Fund- 300.00

I need to take the string above and break it up to look like this below
Im trying to put this into a multiline textbox. Im guessing the cross
looking things are the enterkey. Some single and some double in this
example.
There could be more then that in the database.
If someone could help me i would appreciate it.

Tax-82.54 Disc-0 Online-206.50 Instant-503.00
CC-146

Visa-139.14
MC-
Debit-187.26

PM-3.00
RJR-
Lor-
S&M-
USST-7.00
Other-
Total Coupons-10.00




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to Excel memo-type field transfer caloy Excel Discussion (Misc queries) 2 March 6th 07 09:37 PM
Access Memo field to Excel Textbox ABM Excel Programming 1 February 13th 07 06:38 PM
field shows (memo) not data RogerJ Excel Discussion (Misc queries) 0 July 12th 06 11:31 PM
Export memo field in Access to Excel - data gets cut off cpurpleturtle Excel Discussion (Misc queries) 0 June 22nd 06 04:24 PM
How to copy Memo BLOB field from Interbase database DoubarSingh Excel Discussion (Misc queries) 1 October 10th 05 04:14 AM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"