Prev: don't want to display the Gridlines in Chart Space of VB6
Next: Copy from Listbox or Textbox to folder on C Drive
From: Paul Clement on 2 Jul 2010 15:29 On Fri, 02 Jul 2010 14:00:17 +0100, Alex Balfour <AlexBalfour(a)stokepoges.plus.com> wrote: � In a freeware offering to which I'm adding a Currency Converter, I'm � downloading and unzipping a file of currency exchange rates from the � European Central Bank website each day. Everything is working fine on a � number of Windows 7 systems, both 32-bit and 64-bit, but produces � run-time error 430 (Class doesn't support Automation) on two different � Windows XP based PCs. � � I've pinpointed the cause of the error message to the line: � � Set ShellClass = New Shell32.Shell Have you tried using Regsvr32 to re-register Shell32.dll? Paul ~~~~ Microsoft MVP (Visual Basic)
From: Kevin Provance on 2 Jul 2010 15:41 "Alex Balfour" <AlexBalfour(a)stokepoges.plus.com> wrote in message news:i0l9k8$5b6$1(a)news.eternal-september.org... : : Any suggestions anyone? All I need is a simple unzip capability. Info-ZIP. Google it. -- Customer Hatred Knows No Bounds at MSFT Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc Bawwk! Paulie want a dingleball, bawwk!
From: Mayayana on 2 Jul 2010 18:43 | | Have you tried using Regsvr32 to re-register Shell32.dll? | Paul, I'm surprised at you. Have you been sniffing barbecue lighter fluid, or do you think you're in one of those daffy .Net groups? :)
From: Alex Balfour on 2 Jul 2010 19:49 On 02/07/2010 20:41, Kevin Provance wrote: > > "Alex Balfour"<AlexBalfour(a)stokepoges.plus.com> wrote in message > news:i0l9k8$5b6$1(a)news.eternal-september.org... > : > : Any suggestions anyone? All I need is a simple unzip capability. > > Info-ZIP. Google it. > > > Hi Kevin, Your suggestion works like a dream up to a point. The line RetVal = Shell("unzip.exe" & " " & "eurofxref.zip", 0) creates the file CSV text file eurofxref.csv as required. It looks perfect when opened in a text editor (PSPad) but, when I try to use it, VB6 keeps telling me that I have read beyond the end of the file, presumably because there is no final Ctrl+Z. I can solve this problem by opening the file in PSPad, making a minor edit, undoing the edit and saving the file, but clearly that is a temporary kluge. I tried changing the above to: RetVal = Shell("unzip.exe" & " -aa " & "eurofxref.zip", 0) but the problem persists. Do I need to change the command line options or what? By the way, the CSV file produced by the European Central Bank is unusual. It contains several line feed characters and no carriage returns. AlexB
From: Larry Serflaten on 2 Jul 2010 20:44 "Alex Balfour" <AlexBalfour(a)stokepoges.plus.com> wrote > creates the file CSV text file eurofxref.csv as required. It looks > perfect when opened in a text editor (PSPad) but, when I try to use it, > VB6 keeps telling me that I have read beyond the end of the file, > presumably because there is no final Ctrl+Z. > > I can solve this problem by opening the file in PSPad, making a minor > edit, undoing the edit and saving the file, but clearly that is a > temporary kluge. A file, is a file, is a file, is a file.... VB can open any file. They are just so many bytes on a disk. How you treat them is what matters. If they throw garbage at you, wear a raincoat. 'Input past the end of the file' sounds like you might be using Line Input. Have you tried opening the file for Binary access and using Get to fill a Byte array? Once in memory you can slice and dice it to your hearts content.... How are you reading the file, that causes the error? LFS
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: don't want to display the Gridlines in Chart Space of VB6 Next: Copy from Listbox or Textbox to folder on C Drive |