Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open CSV files in template | Setting up and Configuration of Excel | |||
How to open a Template under a different name, preferably the dat | New Users to Excel | |||
can't open template wizard | Excel Discussion (Misc queries) | |||
Auto open a .xlt template | New Users to Excel | |||
DDE and open template | Excel Discussion (Misc queries) |