Results 1 to 10 of 10

Thread: Excel and WINSOCK problems (AGAIN)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260

    Talking Excel and WINSOCK problems (AGAIN)

    Hi All.
    I am currently making a multiplay version of battleships for use across the Net or Lan using EXCEL VBA, However this relys on the winsock componet. What happens when I run this excel spreadsheet on a PC which doesnt have the winsock ocx installed.It will just fall over right?? How can I over come this cos I cant package and deploy it as its a spreadsheet....One way I have thought of and this probaly wont work is to read the winsock in from my comp and store it as text on a spreadsheet then check to see if they have the OCX on ther comp if not read out the text into a file and rename it winsock.ocx...other than that I have no idea....ideas pls... OR is this where I have to get naughty with the raw winsock API's

    Cheers
    Chrisio


  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260
    Well I tried to read the file into a spread sheet and then outputted the resulting text to a new file...just like I thought when I checked the file sizes they were different so thats out the window..any other ideas

    Cheers

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260
    Bump....

  4. #4
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Zip it and unextract it all into the same folder?

    The other alternative is to simply use P&D. Create a simply program, something like "Installation Successfully", which uses the winsock Control for no real purpose, and then have your excel files attached to the exe.

    Not to hard.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260
    Originally posted by Pc_Madness
    Zip it and unextract it all into the same folder?

    The other alternative is to simply use P&D. Create a simply program, something like "Installation Successfully", which uses the winsock Control for no real purpose, and then have your excel files attached to the exe.

    Not to hard.
    Thanks for replying PC_Madness

    never thought of zipping..I could create a self extracting file and have the 2 togeather...now my next problem...how can i see whether the user has the ocx on there comp ..if not then register it?? any ideas.. thanks again

  6. #6
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Well.. see this is the problem.

    You can simply take the winsock control along with you in the zip, and extract it all to the same folder. Basically, VB looks in the Systems Folder, and if its not their, it checks the folder that its in.

    But, if an older version is found in Systems folder, then it'll error out.

    And if the system has a copy of winsock which is out of date, you'll have to do some creative work to copy it across and reboot the system.

    It might be easier to just create a simple setup package.

    I've been in situations in the past where I've had to go into dos to update winsock because its always been in use by the system. (not using a setup file of course )

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260
    ok...I can see this getting hard...as a matter of course when you install any flavour of windows does winsock get installed...if so then the basic elements of the ocx have to be the same I have only used get data and send data and I cant see MS changing them every release..tho I could be wrong

  8. #8
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    No, it comes down to winsock version numbers as well, and even if you've only used a few basic features, it'll still chuck a hissy. The problem is, that it each winsock version may have update how its sends data for example, or the Excel prog my be tied into a piece of coding on the winsock control that won't be there in prior versions.

    This leads to the problems that can happen if you decied to copy the winsock control across yourself as well, as then you'd have to create a check for version numbers and such.

    Winsock isn't installed on Win 95, atleast the systems that I've seen. Win98 and onward.

    Go with a Setup exe, maybe Inno, as P&D can be abit of a ***** when it wants to be.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Newcastle
    Posts
    260
    ok...looks like thats what im going to have to do...thanks for that..

  10. #10
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    lol Have fun.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width