Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

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 Articles Community Forums Sponsor:
  #1  
Old June 20th, 2005, 05:29 PM
theguz theguz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 54 theguz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 34 sec
Reputation Power: 4
Question Quick Question

Does anybody know an equivalent to the GetChar function used in visualbasic.net for excel 2000. Or at least which reference to use. Thanks.

Reply With Quote
  #2  
Old June 22nd, 2005, 09:17 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Out of curiosity, what does the GetChar function do?

lwells

Reply With Quote
  #3  
Old June 22nd, 2005, 01:27 PM
theguz theguz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 54 theguz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 34 sec
Reputation Power: 4
From what I saw it takes any character withing a string. For example
Dim word As String
Dim letter As Char

Word = "NAMES"
letter = GetChar(word, 4) 'Letter = E

I think it is only availiable in newer versions of VB though.

Reply With Quote
  #4  
Old June 22nd, 2005, 03:28 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
I think this would be a similar function

Function GetChar(strWord As String, n As Integer)
On Error GoTo Err_Handler
Dim i As Integer
Dim pos As Integer
Dim strReturn As String
Dim strLetterCount As Integer
i = 1
pos = InStr(i, strWord, "")
strLetterCount = 0
Do While pos <> 0
strReturn = Mid(strWord, i, 1)
strLetterCount = strLetterCount + 1
If strLetterCount = n Then Exit Do
i = pos + 1
pos = InStr(i, strWord, "")
Loop
If strLetterCount = n Then
GetChar = strReturn
Else
GetChar = ""
End If
Exit Function

Err_Handler:
MsgBox Err.Number & " " & Err.Description
Resume Next

End Function

GetChar("NAMES",4) will return the letter E

See if this is what you were asking.

lwells

Reply With Quote
  #5  
Old June 22nd, 2005, 03:46 PM
theguz theguz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 54 theguz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 34 sec
Reputation Power: 4
Thanks once again

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Quick Question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT