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: 1
Default Open as template only


Hi,

Can someone advise as to how i write this code so that the user for
only opens if the file is a template?

Cheers!!

Private Sub machine_change()
Dim myVal As String
Dim fRng As Range
Dim tRng As Range
Set fRng = Nothing
Set tRng = Worksheets("inclusions").Range("h1")
Select Case machine.Text
Case Is = "MAN Roland R202"
Set fRng = Worksheets("pricing").Range("e1")
Case Is = "MAN Roland R204"
Set fRng = Worksheets("pricing").Range("f1")
Case Is = "MAN Roland R205"
Set fRng = Worksheets("pricing").Range("g1")
Case Is = "Clear"
Set fRng = Worksheets("pricing").Range("h1")
Case Else
End Select
If fRng Is Nothing Then
Else
tmp = MsgBox("Please note, you are selecting final machin
configuration and pricing!", vbOK)
fRng.EntireColumn.Copy _
Destination:=tRng
End If
End Sub

Private Sub UserForm_Initialize()
machine.AddItem ("MAN Roland R202")
machine.AddItem ("MAN Roland R204")
machine.AddItem ("MAN Roland R205")
End Su

--
gavme
-----------------------------------------------------------------------
gavmer's Profile: http://www.excelforum.com/member.php...nfo&userid=666
View this thread: http://www.excelforum.com/showthread.php?threadid=26674

 
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
Open CSV files in template CattleDr Setting up and Configuration of Excel 0 July 30th 07 11:06 PM
How to open a Template under a different name, preferably the dat Barry needs help with excel templates New Users to Excel 1 May 9th 07 07:43 AM
can't open template wizard Lynda S Excel Discussion (Misc queries) 0 September 20th 06 03:35 PM
Auto open a .xlt template Khoa New Users to Excel 2 July 26th 06 06:54 AM
DDE and open template Galliano Excel Discussion (Misc queries) 0 April 11th 06 09:15 AM


All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"