Freeze Excel Spreadsheet till template open first then spreadsheet

Hi,

When I export the data from Access 2002 to excel spreadsheet after
select excel templates.  I couldn't open the spreadsheet until i open
the template and then closed the template.  I open the spreadsheet
where i get the data from Access 2002.  It works.

Here is the area that I have trouble with.


    'Hide warnings on the spreadsheet
    ExcellApplication.DisplayAlerts = False
    'Save the workbook
    ExcellApplication.ActiveWorkbook.Save
    'Turn spreadsheet warnings back on

    ExcellApplication.DisplayAlerts = True

    'Make it visible
    ExcellApplication.Visible = True
    ExcellApplication.Visible = False

Your help would be much appreciated.
Thanks
0
10/26/2008 1:20:20 PM
excel 39879 articles. 2 followers. Follow

1 Replies
757 Views

Similar Articles

[PageSpeed] 56

Hi,

I'm not sure what you mean by template since your code doesn't show any 
lines to that effect.  The usual code for exporting data to Excel would be:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
    "Employees","C:\Excel\Newemps.xls", True, "A1:G12"

However, you would probably get better results by posting to the Access 
Newsgroup here at the Microsoft site.

If this helps, please click the Yes button.
-- 
Thanks,
Shane Devenshire


"learning_codes@hotmail.com" wrote:

> Hi,
> 
> When I export the data from Access 2002 to excel spreadsheet after
> select excel templates.  I couldn't open the spreadsheet until i open
> the template and then closed the template.  I open the spreadsheet
> where i get the data from Access 2002.  It works.
> 
> Here is the area that I have trouble with.
> 
> 
>     'Hide warnings on the spreadsheet
>     ExcellApplication.DisplayAlerts = False
>     'Save the workbook
>     ExcellApplication.ActiveWorkbook.Save
>     'Turn spreadsheet warnings back on
> 
>     ExcellApplication.DisplayAlerts = True
> 
>     'Make it visible
>     ExcellApplication.Visible = True
>     ExcellApplication.Visible = False
> 
> Your help would be much appreciated.
> Thanks
> 
0
10/26/2008 3:56:01 PM
Reply:

Similar Artilces:

Outlook won't open after reinstalling it after installing Windows
My computer crashed. I installed Windows 7, and then reinstalled Office 2007. Outlook will not open. Any suggestions? Margye Hixson Suggest providing information. Include what you did, what happened and any and all error messages. Be detailed as if we weren't there and don't know what happened. -- Russ Valentine "Margye" <Margye@discussions.microsoft.com> wrote in message news:9F85CAAC-2042-4CAB-A329-EF6B3A682189@microsoft.com... > My computer crashed. I installed Windows 7, and then reinstalled Office > 2007. > Outlook will not open....

Excel
Hi! I have an Excel sheet were I have a few formulas. When the sheet is empty of numbers the formula return the value #DIV/O! I would like to know how I can hide this text - it does not look neat. I want the formula to be there; but to show as empty. I have tried to use conditional formatting which does hide the formula - but it then also hides the result when I actually put numbers into the sheet. Kathrine, Norway Kathrine, Did you use a formula in CF, such as =ISERROR(A1) You could also change your formula to =IF(ISERROR(the_formula),"", the_formula) -- HTH RP (re...

Add a search button to pull text with in a spreadsheet like this forums search button
I want to know how to add a search button to microsoft excel similar t this forums that pull up specific text. This is for a big busines project -- Message posted from http://www.ExcelForum.com This works for me when associated with a button. Dim wks As Worksheet Dim rng As Range Dim strAddress As String, strFind As String strFind = InputBox("Please enter search reference:") For Each wks In Worksheets Set rng = wks.Cells.Find(strFind, lookat:=xlWhole LookIn:=xlFormulas) If Not rng Is Nothing Then strAddress = rng.Address Do Application.Goto rng, True If MsgBox("Continue S...

I want work, and view,a single sheet in Mac Excel ... like I did in PC Excel
Operating System: Mac OS X 10.6 (Snow Leopard) How do you setup MAC Excel to be able to work in a single sheet format ... the Mac Excel comes up showing several sheets. It isn't showing "several sheets", it's using the newly introduced Page Layout View by default. You're only viewing the one sheet but it's 'separated' into pages as it would be if you were to print the sheet. You can click the Normal View button in the lower left corner of the document window or go to View> Normal to change the view of any given sheet at any time you wish � Norma...

CEICW freezes at configuring firewall
Hello, this post in in relation to my other post of the ntbackup not working. I did a restore and the backups works fine, and i was just testing everything out, when i noticed, the CEICW was not working correctly. IT always freezes at configuring firewall and its 1cm away from finishing that. IT causes the computer to lockup. there are no errors in the event log, or in the ICW.log. the log stops with no errors. I even went back 3 months with the backup and it still has the same problem. I found a working backup from 09 but the active directory has changes so much that it is n...

VLookup to merge Access Query data into Excel Report
Bernie, You mentioned to Bum that you had some code to merge Access Query Data into specific cells in Excel. Can you send me that code as well. I would greatly appreciate it. Vira-SJH ...

excel worksheets getting deleted in shared files on P4
Hi all I am using a workbook of 3 Mb on a network where I am using Excel 9 and MS Windows. File contains 32 worksheets for a month. Network trafic is more but th comp has 512 MB ram and uses some oracle app also. The files are sometimes shared and contains some 3d as well as arra formulas. The worksheets are getting deleted automatically when we are trying t save the file. What can be the possible reasons. Why do sheets ge deleted????? Thanx in advance Keda -- Message posted from http://www.ExcelForum.com ...

Printing from Excel #3
Can Excel produce printed reports in a reading view, like Word? If so, how do I do this? Thanks. you mean like File / Print Preview? To make it look like a report, do it with a macro I have a file that is about 10 pages long. I want to be able to print it Landscape, and put page 1 and page 2 side by side on the first sheet, then 3 and 4 and so on. You can do it in Word, it is something like a Reading view, but I can't figure out how to do in Excel. Page Setup, fit to page did not work. Printer was even setup to do 2 pages per sheet, but it did not work. Any thoughts? &quo...

Excel not opening documents correctly
I double click an Excel file in windows explorer, Excel starts, but the file doesn't open. Minimize Excel and then maximize and the file is open. Using 2007. Any help would be appreciated "s.edwards" wrote: > I double click an Excel file in windows explorer, Excel starts, but the file > doesn't open. Minimize Excel and then maximize and the file is open. > > Using 2007. Any help would be appreciated let me add... that I've made sure "Ignore other applications" is unchecked and ran the excel.exe /unregserver and excel.exe /r...

Programming for different version of EXCEL
I am going to start a program that will be used on multiple computers. Some have EXCEL 2003 and some have 2000. My development machine has 2003. If I supply the interop DLL from my computer to the machines running 2000 will my program be compatible? if not what is the best way to go about starting this project? Personally I have developed programs on 2K that would not run on 97. I only imagine there are similar problems among other version changes. The only solution I've found is to do the development in the oldest version you expect to be used. The compatibility in that dir...

excel syntax
Hi All, I am trying the following in vbscript... I keep having trouble with zoom and pagebreaks- what am I doing wrong- or what should i be doing? Dim xlapp Dim objWorkBook DIM XLWB Set xlapp = CreateObject("EXCEL.APPLICATION") Set objWorkBook = xlapp.Workbooks.Open("C:\test22.xls") Const xlLandScape = 2 xlapp.ActiveSheet.PageSetup.Orientation = xlLandScape xlapp.ActiveSheet.PageSetup.FitToPagesWide = 1 xlapp.ActiveSheet.PageSetup.FitToPagesTall = 99 xlapp.ActiveSheet.ResetAllPageBreaks 'xlapp.ActiveSheet.Zoom = False ActiveSheet.HPageBreaks(1).Locatio...

Multiple workbooks opening
When I open an excel saved file, two blank workbooks open at the same time. This happens no matter what file I open. Is there a way to stop this? Thanks -- justinlucy ------------------------------------------------------------------------ justinlucy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30838 View this thread: http://www.excelforum.com/showthread.php?threadid=504984 Take a look in a folder called XLSTART and see if you have any Excel files stored in there, as they will start any time you launch Excel. Mine is located here:- C:\Documents and...

Shading alternate rows in Excel
Is there someway to shade every other row in an Excel speadsheet without doing it one by one? Hi Whoray, Here's one way: Select the range of rows that you want to highlight. Goto Format>Conditional Formatting Formula Is =MOD(ROW(),2)=1 Select the background fill pattern you want OK out If you want the second row to start the highlight then just simply change the formula from =1 to =0 Biff >-----Original Message----- >Is there someway to shade every other row in an Excel speadsheet without >doing it one by one? > > >. > ...

Outlook 2007 freezes/crashes on startup most of the time
A little more than 50% of the time, Outlook 2007 freezes for me on startup. Usually it is very early on -- according to the task manager, there has been very little I/O when it freezes. When frozen, there is no I/O or change in RAM usage. It appears to be totally dead. After killing the task and restarting a few times, sometimes it will start up fine, other times it will ask me to disable an add-on. The add-on to be disabled appears to be varied randomly. Usually if I disable the add-on, it starts up okay, and then I can re-enable the add-on from the trust center and it works fine from then o...

Importing the format (Excel 2003)
I'm using a vlookup function to import data from a pivot table but I'd like to import the format as well. From previous posts this is apparently not possible unless you use codes. I'm unfortunately not familiar with coding. Is there maybe a site you could direct me to where I would be able to figure out what I need to do? Any links to sites where one could learn a bit more about macros and coding would be helpful as well. Hi Jaco, After entering the v-lookup formulae in the required cell, you can use paset - special format from the respective pivot field. -- Dilip Kumar Pandey...

Outlook 2003 A Dialog Box Is Open
A friend of mine called because all of a sudden her Outlook 2003 started popping up a message "A dialog box is open". Actually this is the second time this has happened. As usual I Googled on this problem and most people seem to think that the dialog that's hidden is the one that pops up when you first install office and open an application that asks you for your name and initials. The first time around I tried opening Word / Access and PowerPoint and that dialog never opened, most likely because it had already been filled in after the initial installation. I did a ...

XBRL in Excel 2003
Trying to download data from EDGAR in Excel 2003 using the Get Data function > of XBRL and get the follwoing error. Of course nothing anywhere to be found > on this. > I'll be shocked but pleasanly surprised if anyone can help with this. > Here's the error: > -2146233088 An error occrred while getting the information from the EOL > Service. Location:modmsxbrl.bgetEOLInstance. > -- frdfrd ...

Users asked to enter Username / Password /Domain when opening outl
Just this morning, our users are being asked for their username / domain and password. When we eneter it in, the box reappearas after we eneter it again we get and error that the information store could not be opened. We are running Exchanage 5.5 with Windows 2000. Any help would be great. Thanks in advance =?Utf-8?B?SmVmZg==?= <Jeff@discussions.microsoft.com> wrote in news:DD28037B-B6C8-4575-B0CC-F80C14991716@microsoft.com: > Just this morning, our users are being asked for their username / > domain and password. When we eneter it in, the box reappearas after we > eneter...

protecting cells (Excel 2000)
How do I prevent certain cells from being altered, allowing users to enter data only in certain areas. I can only see how to protect an entire sheet or workbook. Cheers David Kinston melbourne.au Hi first select the cells for which you want allow entries. Goto Format - Cells - Protection and uncheck 'Locked'. Now protect the sheet -- Regards Frank Kabel Frankfurt, Germany "David Kinston" <a@b.c> schrieb im Newsbeitrag news:Otkx#SewEHA.2568@TK2MSFTNGP11.phx.gbl... > How do I prevent certain cells from being altered, allowing > users to enter data only in cert...

need help with VBA on opening a form if Vlookup is false.
I am using this code right now to insert data from a form to spreadsheet. If chkMProFCB.Value = True Then Range("C15").Select If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Range("c65536").End(xlUp).Offset(1, 0).Value Application.WorksheetFunction.VLookup(chkMProFCB.Caption Workbooks("bidditdb.xls").Sheets("wa").Range("a1:b200"), 2, False) Range("J65536").End(xlUp).Offset(1, 0).Value Application.WorksheetFunction.VLookup(txtMproFCB.Text Workbooks("bidditdb.xls").Sheets("mat").Range(&q...

Excel question #6
I have a data set with 538 rows. There's a column of values that if they're less than 4.18, I want to replace it with 0, above 5.76 replace it with 2, and in between replace it with 1. How can I do this without manually typing each one? I googled this and got some info that looked like I'd have to type up some code, but it seems that there should be an easier way. Any help is appreciated - thanks! I'd insert a new column to the right of this column. Then use a formula: =if(a1<4.18,0,if(a1<=5.76,1,2)) or if there could be text: =if(isnumber(a1),if(a1<4.18,0,i...

Excel plotting problems with columns and lines
I plotted rainfall data and river levels on an X-Y graph. I then changed the way the rainfall was displayed from a line into columns. Unfortunately, Excel changed the way it treated the rainfall data, changing it from a time series into categories and creating a hidden secondary X-axis. While this may be understandable, Excel also alterred the maximum value of the X axis, changing it from 60 down to 48. This meant that the position of each column did not line up with the corresponding hour on the primary axis. This wouldn't have been a major problem if the secondary axis...

How do train with practice downloads in Excel 3 when I have Excel
Hello Group, I have Excel 3 and recently downloaded Office Professional 2007 when I try to practice in office online training in Excel 3 it only opens office 2007? Since 2007 has decided it wants to be the default, de-register 2007 and re-register 2003 Close Excel first and On the Windows Taskbar Start>Run "C:\yourpathto2007\excel.exe" /unregserver See the space between exe and /unregserver. Then register 2003 Start>Run "C:\yourpathto2003\excel.exe" /regserver This process should make Excel 2003 the default for opening files. You may n...

search feature in Excel
Hello all, I have a little project to do and would like to get some help on usin the search feature in a simple worksheet. I have a worksheet that contains over 25 excel sheets, each with lot of information. I need to make a search feature/button, so people using it can use th first sheet named Search to locate their keywords in the 25 sprea sheets and growing. Something to look like this; Label:Enter Search Words: ________________ Click here t search/button Can you point me to some resources on the issue or provide exampl code. Thank you in advance, sekte ---------------------...

Can not open file
I was working on a single Access database, and sudenly when tried to open, it gave me the following message: Record(s) cannot be read; no read permission on <name>. (Error 3112) I am the one who created the database. I have full control. I am not even able to open the database so I can repair from the Database Utilities menu. Any ideas or am I in big trouble? Thanks Lucia On Tue, 8 Jan 2008 11:37:02 -0800, Lucia <Lucia@discussions.microsoft.com> wrote: >I was working on a single Access database, and sudenly when tried to open, it >gave me the following message: > &...