Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extracting variable sized strings from binary file

I need to extract strings from a binary file with the following format

INT-STRING-INT_STRING-INT-STRING-..........

where the integer is the length of the string.

I want to make a function that does what this failed attempt yearns...


Public Function svString(ByVal FileNo As Integer, Cursor As Integer) As
String
Dim sze As Integer
sze = 10
Get #FileNo, Cursor, sze ' Get string len
Dim svString As String * sze
Get #FileNo, Cursor + 4, svString ' Get string
End Function


The problem is declaring an array whith a variable (has to be constant)
can anybody provide tips ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Extracting variable sized strings from binary file

Bump ...

Any pointers would be really appreciated ...

luis wrote in message ...
I need to extract strings from a binary file with the following format

INT-STRING-INT_STRING-INT-STRING-..........

where the integer is the length of the string.

I want to make a function that does what this failed attempt yearns...


Public Function svString(ByVal FileNo As Integer, Cursor As Integer) As
String
Dim sze As Integer
sze = 10
Get #FileNo, Cursor, sze ' Get string len
Dim svString As String * sze
Get #FileNo, Cursor + 4, svString ' Get string
End Function


The problem is declaring an array whith a variable (has to be constant)
can anybody provide tips ?

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
Using variable sized range in CountIf() [email protected][_2_] Excel Discussion (Misc queries) 1 October 24th 07 11:15 AM
Variable sized combo box Bruce[_7_] Excel Programming 1 August 10th 04 09:28 AM
Calculating Average on variable sized datasets w/VBA nano Excel Programming 1 February 3rd 04 02:36 AM
Variable sized average macro/function danwtf2004 Excel Programming 2 January 29th 04 10:11 PM
Summing a variable sized range programmatically Norma[_2_] Excel Programming 3 August 24th 03 07:31 PM


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

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

About Us

"It's about Microsoft Excel"