Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am so close to finishing this button but I am getting the error:
Compile error: Procedure declartion does not match description of event or procedrue having the same name. Here is my code: Private Sub Commandbutton1_click(ByVal Sh As Object, ByVal Target As Range) Worksheets("Report").Unprotect Dim rng As Range, rngA As Range If Target.Value("Report").Range("A1:J9769") = "No Photo" Then Set rng = Target.Offset(-3, -1) Selection.Font.ColorIndex = 2 Selection.Interior.ColorIndex = 2 Range("A1:J9769").Select Selection.Copy Dim WDApp As Object Dim WDDoc As Object Dim myDocName As String myDocName = "Survey Report.doc" Set WDApp = CreateObject("Word.Application") WDApp.Visible = True Set WDDoc = WDApp.documents.Open("F:\Survey Test\Word\Survey Report.doc") Worksheets("Report").Protect ws_exit: Application.EnableEvents = True End Sub Can somone help? Thank you, Daniel |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming | |||
Userform - CommandButton_Click question | Excel Programming |