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: 16
Default Import sheet error

Hi

I am trying to use the below code to import a title page for my reports but
it is coming with the error message:
'Compile error: Object error'
On line 'Set CurrWb = ActiveWorkbook.Name'

Can anyone help resolve this?

TIA

Sub AddTitlePage()
Dim CurrWb As String
Dim TitleWb As Workbook

Set CurrWb = ActiveWorkbook.Name
Set TitleWb = Workbooks.Open("F:\Resources\Title Page.xls")

With TitleWb
..Sheets("Title").Copy Befo=Workbooks(CurrWb).Sheets(1)
..Close
End With

End Sub

 
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
XML Import Parsing error Jeff Excel Discussion (Misc queries) 1 October 10th 09 10:50 AM
Excel 2007 Japanese Import Error hamster0914 Excel Discussion (Misc queries) 0 December 29th 06 02:30 AM
MS Query import from Excel - Syntax Error EstherJ Excel Discussion (Misc queries) 1 April 24th 06 09:44 AM
Error message when trying to import csv into Outlook contacts. [email protected] Excel Discussion (Misc queries) 1 April 13th 06 03:15 PM
HTML/XML Import Error -ExcelName smcclure Excel Programming 0 October 22nd 04 06:19 AM


All times are GMT +1. The time now is 09:16 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"