spreadsheet to vbs exe

pradyuthal

Board Regular
Joined
Jul 13, 2005
Messages
212
how do I convert an excel spreadsheet and/ or workbook to exe file (Visual basic )

Please help me.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,722
Please explain what you are aiming for ... are you saying you want to look at a spreadsheet without it going through the Excel interface?
 

NdNoviceHlp

Well-known Member
Joined
Nov 9, 2002
Messages
3,062
Add the XLS file as a custom resource file to your VB6 project then use this line (if resource file is 101)...
Code:
LoadDataIntoFile 101, "c:\filename.xls"
with this routine..
Code:
Public Sub LoadDataIntoFile(DataName As Integer, filename As String)
    Dim myArray() As Byte
    Dim myFile As Long
    If Dir(filename) = "" Then
        myArray = LoadResData(DataName, "CUSTOM")
        myFile = FreeFile
        Open filename For Binary Access Write As #myFile
        '
        Put #myFile, , myArray
        
        Close #myFile
    End If
End Sub
From VB6, this will place your added XLS resource file into whatever destination you assign (ie."c:\filename.xls"). You can set up your VB6 project to add this file during execution then remove this file before project closing. The file is then only available as an exe. HTH. Dave
 

Forum statistics

Threads
1,172,022
Messages
5,878,768
Members
433,370
Latest member
mcleven

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top