Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Finding Workbook name - HELP

I need to show an inputform only when a certain workbook is open. the problem
i am having is that when i open the file, i input info into the inputform and
when i hit enter, it saves a copy of the file as another name but with the
same code, hense "inputform.show" stuff. I dont want the new file name to
show the inputform when it is open, only show when origional is opened.
something like this maybe? thx

If WorkbookName = "Filename.xls" Then
InputForm.Show
Else
Do nothing
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Finding Workbook name - HELP

Hi Jim, A built in quirk in Excel is that if you save the file that is
running the code module under a different name, it takes the code right along
with it. One way around it is to just copy the sheets from one workbook to
another, or another way is to put your code in a separate workbook than the
one you are saving.

"Jim" wrote:

I need to show an inputform only when a certain workbook is open. the problem
i am having is that when i open the file, i input info into the inputform and
when i hit enter, it saves a copy of the file as another name but with the
same code, hense "inputform.show" stuff. I dont want the new file name to
show the inputform when it is open, only show when origional is opened.
something like this maybe? thx

If WorkbookName = "Filename.xls" Then
InputForm.Show
Else
Do nothing
End If

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Finding Workbook name - HELP

If lcase(Application.Thisworkbook.Name) = lcase("Filename.xls") Then
InputForm.Show
Else
Do nothing
End If

--
Regards,
Tom Ogilvy


"Jim" wrote:

I need to show an inputform only when a certain workbook is open. the problem
i am having is that when i open the file, i input info into the inputform and
when i hit enter, it saves a copy of the file as another name but with the
same code, hense "inputform.show" stuff. I dont want the new file name to
show the inputform when it is open, only show when origional is opened.
something like this maybe? thx

If WorkbookName = "Filename.xls" Then
InputForm.Show
Else
Do nothing
End If

  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Finding Workbook name - HELP

THANKS TOM, WORKS GREAT

"Tom Ogilvy" wrote:

If lcase(Application.Thisworkbook.Name) = lcase("Filename.xls") Then
InputForm.Show
Else
Do nothing
End If

--
Regards,
Tom Ogilvy


"Jim" wrote:

I need to show an inputform only when a certain workbook is open. the problem
i am having is that when i open the file, i input info into the inputform and
when i hit enter, it saves a copy of the file as another name but with the
same code, hense "inputform.show" stuff. I dont want the new file name to
show the inputform when it is open, only show when origional is opened.
something like this maybe? thx

If WorkbookName = "Filename.xls" Then
InputForm.Show
Else
Do nothing
End If

Reply
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
Finding a Workbook based on a Cell information in another Workbook Walter Excel Worksheet Functions 1 October 10th 09 08:46 AM
Finding a value from another workbook jet Excel Programming 7 September 23rd 05 08:23 AM
Finding all AutoShapes in workbook ExcelMonkey Excel Programming 2 August 26th 05 05:25 PM
Finding data in another workbook JCanyoneer Excel Programming 4 August 17th 05 07:25 PM
Finding duplicate value in another workbook morry[_3_] Excel Programming 4 February 11th 04 10:27 PM


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