JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for EXCEL-VB-DISCUSS Archives


EXCEL-VB-DISCUSS Archives

EXCEL-VB-DISCUSS Archives


EXCEL-VB-DISCUSS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

EXCEL-VB-DISCUSS Home

EXCEL-VB-DISCUSS Home

EXCEL-VB-DISCUSS  May 2000

EXCEL-VB-DISCUSS May 2000

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

RE: Exporting Excel data into Access Database

From:

"Favis, Tyrone" <[log in to unmask]>

Reply-To:

[log in to unmask]

Date:

Mon, 8 May 2000 15:23:15 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (148 lines)

Hi Soren,
I got it working.  I recopied the code.  This time to my Personal.xls.
Compiled it and it did not give me any compile error.  I am using xl97 sr-2.
I don't know why I got that compile error when I ran it directly to my
spreadsheet.
Thanks,
Tyrone

> -----Original Message-----
> From:	Søren Worldonline [SMTP:[log in to unmask]]
> Sent:	Monday, May 08, 2000 2:26 PM
> To:	[log in to unmask]
> Subject:	Sv: Exporting Excel data into Access Database
> 
> Hi Tyrone,
> It works on my machine when I reimport the text I sent to you. On the
> other hand I think I have seen that error too - in some other context.
> Try "Set fld = tbl.CreateField" instead of "Set fld=New Field".
> Which version of Excel do you use?
> regards, Søren
> 
> 
> ----- Original Message ----- 
> From: Favis, Tyrone <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Monday, May 08, 2000 5:21 PM
> Subject: RE: Exporting Excel data into Access Database
> 
> 
> > Hi Soren,
> > I tried your code.  I am getting a compile error at Set fld=New Field.
> It
> > is saying "Invalid use of New keyword".  What am I doing wrong?  I have
> > referenced DAO and created a "test.mdb".
> > Tyrone
> > 
> > > -----Original Message-----
> > > From: Søren Worldonline [SMTP:[log in to unmask]]
> > > Sent: Thursday, May 04, 2000 6:34 PM
> > > To: [log in to unmask]
> > > Subject: Sv: Exporting Excel data into Access Database
> > > 
> > > You could use DAO to access a database, make a table with same names
> as
> > > the yellow cells.
> > > > 
> > > > Afterwards you could store all yellow cells in a record (max. 255 in
> on
> > > table record).
> > > > Below I make an exsample:
> > > > (You need to reference  DAO in VBA to run the code. And to make a
> access
> > > database named test in default dir.)
> > > > 
> > > > Sub maketable()
> > > >     Dim db As Database
> > > >     Dim tbl  As TableDef
> > > >     Dim fld As Field
> > > >     Dim r As Range
> > > >     Set db = OpenDatabase("test.mdb")
> > > >     Set tbl = New TableDef
> > > >     tbl.Name = "table" & db.TableDefs.Count + 1
> > > >     For Each r In ActiveSheet.UsedRange
> > > >         If r.Interior.Color = vbYellow Then
> > > >             Set fld = New Field
> > > >             fld.Name = r.Address(ReferenceStyle:=xlR1C1)
> > > >             fld.Type = dbText
> > > >             fld.AllowZeroLength = True
> > > >             fld.Size = 50
> > > >         tbl.Fields.Append fld
> > > >         End If
> > > >     Next r
> > > >     db.TableDefs.Append tbl
> > > >     db.Close
> > > > End Sub
> > > > 
> > > > 
> > > > Sub adrecord()
> > > >     Dim r As Range
> > > >     Dim rs As Recordset
> > > >     
> > > >     Dim db As Database
> > > >     Set db = OpenDatabase("test.mdb")
> > > >     Set rs = db.OpenRecordset("table" & db.TableDefs.Count,
> dbOpenTable)
> > > >     rs.AddNew
> > > >     For Each r In ActiveSheet.UsedRange
> > > >         If r.Interior.Color = vbYellow Then
> > > >             rs.Fields(r.Address(ReferenceStyle:=xlR1C1)) = r
> > > >         End If
> > > >     Next r
> > > >     rs.Update
> > > > End Sub
> > > > 
> > > > Søren
> > > > 
> > > 
> > > ----- Original Message ----- 
> > > From: Fields, Jean <[log in to unmask]>
> > > To: <[log in to unmask]>; <[log in to unmask]>
> > > Sent: Wednesday, May 03, 2000 11:27 PM
> > > Subject: Exporting Excel data into Access Database
> > > 
> > > 
> > > > Hello all!
> > > > 
> > > > I have an Excel 97 workbook "input form" which consists of 10
> worksheets
> > > and
> > > > the user fills in yellow cells throughout each sheet.   None of the
> > > yellow
> > > > cells are named ranges.  On some sheets, there are more than 300
> yellow
> > > > cells.  I am looking for the best way to dump the data in the yellow
> > > cells
> > > > into an Access database  (I will eventually have 800 of these
> > > workbooks).   
> > > > 
> > > > Here's what I've come up with so far:
> > > > 1) organize the Excel data into columnar form within Excel, so I can
> > > > use transferdatasheet method in Access.
> > > > Or
> > > > 2) open up each Excel workbook in Access and pull the data from the
> > > > relevant cells.
> > > > 
> > > > Anyone with a better idea?  I'm afraid I'm stuck with the workbook
> as
> > > is,
> > > > but if anyone has suggestions on changing it to make my life easier,
> > > maybe I
> > > > can get it modified.
> > > > 
> > > > TIA,
> > > > -Jean
> > > > 
> > > > 
> > > > Jean Fields
> > > > GDS Engineers, Inc.
> > > > 9009 W. Loop South, Suite 800
> > > > Houston, TX  77096-1719
> > > > Tel. (713) 667-9162
> > > > Fax. (713) 667-9241
> > > > Email: [log in to unmask] <mailto:[log in to unmask]> 
> > > > 
> > 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Top of Message | Previous Page | Permalink

JISCMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

February 2012
November 2011
October 2011
September 2011
July 2011
June 2011
April 2011
March 2011
February 2011
August 2010
June 2010
May 2010
January 2010
November 2009
September 2009
August 2009
July 2009
January 2009
September 2008
August 2008
July 2008
June 2008
May 2008
March 2008
February 2008
January 2008
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001
December 2000
November 2000
October 2000
September 2000
August 2000
July 2000
June 2000
May 2000
April 2000
March 2000
February 2000
January 2000
December 1999
November 1999
October 1999
September 1999
August 1999
July 1999
June 1999
May 1999
April 1999
March 1999
February 1999
January 1999
December 1998
November 1998
October 1998
September 1998
August 1998
July 1998
June 1998
May 1998
April 1998
March 1998


WWW.JISCMAIL.AC.UK

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager