Brad Marks
BradM at blackforestltd.com
Fri Jul 1 19:29:08 CDT 2011
Stuart, Yes, you are right. After three decades of COBOL, I am still adjusting to "working storage" prefixes. :-) Brad -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Friday, July 01, 2011 4:58 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" ONly change I'd make is: <quote> Dim Str_Value_in_Cell As Variant </quote> I'd make that Var_Value_in_Cell :-) -- Stuart On 1 Jul 2011 at 13:26, Brad Marks wrote: > Steve, William, Darryl, > > Thanks for the help with my questions. > > The advice that you provided has helped me move forward. > > Below is a stripped down snippet of the Access 2007 VBA code that I > put together based on the advice you provided. > > I am going to post it here in case some other "newbie" is looking for > the very "basic basics" and I am posting it here to see if anyone sees > a problem with the direction that I am heading. > > Thanks again, > Brad > > PS. I also ordered a book on this subject. > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sub Pull_Data_From_Excel_Into_Access() > > Dim XLApp As Excel.Application > > Dim XLWorkbook As Excel.Workbook > > Dim XLSheet As Excel.Worksheet > > Dim Str_Value_in_Cell As Variant > > Set XLApp = CreateObject("Excel.Application") > > XLApp.Workbooks.Open ("C:\Book1.xlsx") > > XLApp.Visible = True ''' to see Spreadsheet > > Set XLWorkbook = XLApp.Workbooks(1) > > Set XLSheet = XLWorkbook.Sheets(1) > > Str_Value_in_Cell = XLSheet.Cells(1, 1).Value > > MsgBox Str_Value_in_Cell > > End Sub > > '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.