LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Stopping Excel after running visual basic in Access

After running the following sub the excel spreadsheet comes up. When
exiting out of excel the program appears to close but doesn't, it's
still running in the background. What's the problem?

Sub xls2()
Dim ex As New Excel.Application
Dim wrkbk As Excel.Workbook
Dim wks As Excel.Worksheet
Dim rng As Excel.Range

Set wrkbk = Workbooks.Open("c:\TRPWKBookA.xls")
Set wks = wrkbk.Worksheets("41 ECS")
wks.Range("b13").Value = 12
Set wks = wrkbk.Worksheets("755")
wks.Range("b13").Value = 13



'Set rng = wks.Cells(2, 13)
' With rng
' .Value =
'Set rng = wks.UsedRange.columns

ex.Visible = True



End Sub

Thanks if anyone can tell me what's wrong.
bill

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I access Visual Basic in Excel 2007 Trial? RandyS Setting up and Configuration of Excel 1 April 2nd 07 12:18 AM
visual basic within Access If...Then arabella79 Excel Discussion (Misc queries) 1 October 5th 06 09:34 PM
visual basic within Access If...Then arabella79 Excel Discussion (Misc queries) 0 October 5th 06 09:24 PM
Activate check "Trust access to Visual Basic " in Excel Pablo via OfficeKB.com New Users to Excel 1 June 23rd 05 04:30 PM
using visual basic to access a protected DB Mike Tomasura Excel Programming 2 November 21st 03 02:59 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"