codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  The Dim appExcel As Excel.Application doesn`t work ????  smith33 at 07:58 on Tuesday, May 31, 2005
 

Option Compare Database
Option Explicit

Private Sub cmdCancel_Click()
'close the dialog box
DoCmd.Close

End Sub


Private Sub cmdOk_Click()
'declare an Excel Application object variable named appExcel
Dim appExcel As Excel.Application
Dim sht1 As Worksheet


'declare a Workbook object variable named wkbSales
Dim wkbSales As workbook

'create an Excel Application object and assign its address to the appExcel variable
Set appExcel = CreateObject(Class:="excel.application")

'open a new workbook and assign its address to the wkbSales variable
Set wkbSales = appExcel.Workbooks.Open("C:\Documents and Settings\Stephanie Smith\My
Documents\wkbSales.xls")
Set sht1 = wkbSales.Worksheets("Sheet1")

'enter current record's information in cells A1, A2, and A3 in the first worksheet
sht1.Range("A1") = Application.Forms("salespeople").Controls("txtId")
sht1.Range("A2") = Application.Forms("salespeople").Controls("txtName")
sht1.Range("A3") = Application.Forms("salespeople").Controls("txtSales")


'use the AutoFit method to adjust the size of column A in the first worksheet
sht1.Columns.Range("A1").AutoFit

'make the Excel Application object visible
appExcel.Visible = True

'release the memory allocated to the Excel Application object
Set appExcel = Nothing

'close the form
DoCmd.Close


End Sub

  Re: The Dim appExcel As Excel.Application doesn`t work ????  dabora100 at 09:37 on Friday, January 28, 2011
 

I don't even know where to begin. Thank you for posting this (I initially found this on Facebook)...I then went searching for the originating Post Dispatch article. I have lived in St. Louis my entire life.
_________________________________________________________________

pass4sure 642-583|| pass4sure 640-721|| pass4sure 642-384|| pass4sure EX0-101|| pass4sure SK0-003|| pass4sure 642-165|| pass4sure JK0-016|| pass4sure 352-001|| pass4sure 312-50|| pass4sure 642-374|| pass4sure 642-637|| pass4sure 642-617









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Web Designing Companies in Chennai
•  Re: Codefest`11
•  Re: refresh parent after closing pop up window
•  Re: The Dim appExcel As Excel.Application doesn`t work ????
•  Re: Plz its urgent:validation code
•  Re: c# .net Exception of type System.StackOverflowException was thrown.
•  Re: need help with main()
•  Re: onclick thumbnail images in gridview or datalist
•  Re: adding a querystring parameter in a button click event


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2011