[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to get an excel file to OPEN without saving it somewhere

Posted on 2015-02-24
2
Medium Priority
?
108 Views
Last Modified: 2015-03-05
I have this code and I want the Excel file to just open and not output it to somewhere.  How do I change my code to do that?


Private Sub cmdExport_ALLORGS_Click()
'On Error GoTo Err_cmdExport_ALLORGS_Click

 Dim username As String, stDocName As String, stFilename As String
 
    If MsgBox("Click YES to export all Allotments to Excel, NO to export current Allotment.", vbYesNo, "Export Options") = vbYes Then
        'stDocName = "QryRecapTest_ExcelOutputALL"
    Else
        stDocName = "Copy of Allot_Q"
    End If
    

    
        
        DoCmd.OutputTo acOutputQuery, "Copy Of Allot_Q", "Excel97-Excel2003Workbook(*.xls)", "", True, "", , acExportQualityScreen
   
'Exit_cmdExport_ALLORGS_Click:
 '   Exit Sub

'Err_cmdExport_ALLORGS_Click:
 '   MsgBox Err.Description
  '  Resume Exit_cmdExport_ALLORGS_Click
    

End Sub

Open in new window

0
Comment
Question by:Jass Saini
[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 39

Accepted Solution

by:
PatHartman earned 1500 total points
ID: 40629006
I'm not going to write the code but you would need to use automation to Open Excel, create a new workbook, make it visible, and populate the rows.

Then the user would need to save it if he wanted to.

But the question is why?  What is wrong with simply using one line of code - TransferSpreadsheet to create the file?
0
 

Author Comment

by:Jass Saini
ID: 40629022
i could use the TransferSpreadSheet ...thank You
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

650 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