Solved

VB6 "SaveAs" not working in Win8

Posted on 2014-03-27
2
260 Views
Last Modified: 2014-03-31
VB6 program developed under XP.
Program installed on Windows 8 machine.
Program constructs an Excel spreadsheet, and saves it.

When program first loads, one bookkeeping chore is to determine the Excel version resident. The following code lines determine the value of variable "iXLVersion", which is used for "FileFormat" in the "SaveAs".

Set oXLApp = CreateObject("Excel.Application")
If oXLApp.Application.Version > "11.0" Then
    iXLVersion = 56
Else
    iXLVersion = -4143
End If
Set oXLApp = Nothing

Open in new window


The following code generates the spreadsheet and saves it:

Set oXLApp = CreateObject("Excel.Application")
Set oXLBook = oXLApp.Workbooks.Add
Set oXLSheet = oXLBook.Worksheets(1)
sWorkbookName = "DataPlayers.sdp"
With oXLApp
'
' Code here loads up the spreadsheet
'
End With
oXLBook.SaveAs App.Path & "\" & sWorkbookName, FileFormat:=iXLVersion
oXLApp.Quit
Set oXLApp = Nothing
Set oXLBook = Nothing
Set oXLSheet = Nothing

Open in new window


Problem: When this program is run on Windows 8, user reports that the generated spreadsheet is not saved.
0
Comment
Question by:NormaPosy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
unknown_routine earned 500 total points
ID: 39959804
0
 

Author Closing Comment

by:NormaPosy
ID: 39968082
Thank you!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question