Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alt+F11
-- Regards, Tom Ogilvy "Ron" wrote in message ... 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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 ToolsMacroVisual 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 -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=516209 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
rookie question | Charts and Charting in Excel | |||
VBA Question (rookie issue) | Excel Programming | |||
Help for a VBA rookie | Excel Programming | |||
Rookie question: placing a value into one cell based on a forrmula in another | Excel Programming | |||
VBA rookie question - listbox and GOTO | Excel Programming |