+ Reply to Thread
Results 1 to 6 of 6

Excel Rookie Question

  1. #1
    Ron
    Guest

    Excel Rookie Question

    I am exporting an Access table to Excel. My problem is that Access exports
    its column headings into the Excel spreadsheet, which is resulting in a row
    (b6) being added that I do not want. I am an experienced Access programmer,
    but I know nothing about Excel. Can I delete (b6) when the Excel sheet is
    opened?

    Can you be kind enough to provide an example?

    Thanks

  2. #2
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462
    I also have quite limited knowledge of Excel code but hope this helps..

    In the Visual Basic screen locate "ThisWorkbook", double click to select and the choose "Workbook" from the drop down on the main page. This should then show

    Private Sub Workbook_Open()

    End Sub

    The just insert this code in between...

    Private Sub Workbook_Open()
    Worksheets("Sheet1").Range("B6").EntireRow.Delete Shift:=xlUp
    End Sub

    Where Sheet1 is the sheet you want to delete the row from.

    Hope this helps

    John

  3. #3
    Ron
    Guest

    Re: Excel Rookie Question

    Thanks,I'll give it a try...Ron

    "johncassell" wrote:

    >
    > I also have quite limited knowledge of Excel code but hope this helps..
    >
    > In the Visual Basic screen locate "ThisWorkbook", double click to
    > select and the choose "Workbook" from the drop down on the main page.
    > This should then show
    >
    > Private Sub Workbook_Open()
    >
    > End Sub
    >
    > The just insert this code in between...
    >
    > Private Sub Workbook_Open()
    > Worksheets("Sheet1").Range("B6").EntireRow.Delete Shift:=xlUp
    > End Sub
    >
    > Where Sheet1 is the sheet you want to delete the row from.
    >
    > Hope this helps
    >
    > John
    >
    >
    > --
    > johncassell
    > ------------------------------------------------------------------------
    > johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
    > View this thread: http://www.excelforum.com/showthread...hreadid=516209
    >
    >


  4. #4
    Ron
    Guest

    Re: Excel Rookie Question

    How do I get to the Visual Basic screen?

    "johncassell" wrote:

    >
    > I also have quite limited knowledge of Excel code but hope this helps..
    >
    > In the Visual Basic screen locate "ThisWorkbook", double click to
    > select and the choose "Workbook" from the drop down on the main page.
    > This should then show
    >
    > Private Sub Workbook_Open()
    >
    > End Sub
    >
    > The just insert this code in between...
    >
    > Private Sub Workbook_Open()
    > Worksheets("Sheet1").Range("B6").EntireRow.Delete Shift:=xlUp
    > End Sub
    >
    > Where Sheet1 is the sheet you want to delete the row from.
    >
    > Hope this helps
    >
    > John
    >
    >
    > --
    > johncassell
    > ------------------------------------------------------------------------
    > johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
    > View this thread: http://www.excelforum.com/showthread...hreadid=516209
    >
    >


  5. #5
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    462
    Sorry Ron, thought you had been in this screen, in that case..

    To open the VB program - In Excel either press ALT+F11 or go to Tools>Macro>Visual Basic Editor.

    I have never used Access so I don't know if they have a similar screen but..

    In VB - On the left hand side you will see the name of your workbook followed by the sheets in that workbook followed by the "ThisWorkbook" as discussed earlier. If your only need in Excel is to remove that row then these are the only things you need to know.

    John

  6. #6
    Tom Ogilvy
    Guest

    Re: Excel Rookie Question

    Alt+F11

    --
    Regards,
    Tom Ogilvy


    "Ron" <[email protected]> wrote in message
    news:[email protected]...
    > How do I get to the Visual Basic screen?
    >
    > "johncassell" wrote:
    >
    > >
    > > I also have quite limited knowledge of Excel code but hope this helps..
    > >
    > > In the Visual Basic screen locate "ThisWorkbook", double click to
    > > select and the choose "Workbook" from the drop down on the main page.
    > > This should then show
    > >
    > > Private Sub Workbook_Open()
    > >
    > > End Sub
    > >
    > > The just insert this code in between...
    > >
    > > Private Sub Workbook_Open()
    > > Worksheets("Sheet1").Range("B6").EntireRow.Delete Shift:=xlUp
    > > End Sub
    > >
    > > Where Sheet1 is the sheet you want to delete the row from.
    > >
    > > Hope this helps
    > >
    > > John
    > >
    > >
    > > --
    > > johncassell
    > > ------------------------------------------------------------------------
    > > johncassell's Profile:

    http://www.excelforum.com/member.php...o&userid=25016
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=516209
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1