Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem Passing Arguments
Greetings,
I am having problems passing arguments from a BeforeDoubleClick event. The problem is that out of five argument that the called procedure is looking for, only 2 will always have a value. Of the other 3 one or more will not have a value depending on what cell is DoubleClicked. This all worked before I moved the UserForm and Module1 from each schedule workbook to only one set in the customer record workbook. At first, I was getting a type mismatch, but now I am getting nothing (no errors and no activity, nothing) Here is my code in the sheet section of the calling workbook: Option Explicit Dim OtherWkbk As Workbook Private Sub Worksheet_BeforeDoubleClick(ByVal _ Target As Range, Cancel As Boolean) Dim sInv As String Set OtherWkbk = Workbooks("MCL6.xls") Select Case Target.Column Case 3 Select Case Target.Row Case 3 To 839 sInv = CStr(Target.Value) End Select Case Else sInv = 0 End Select Application.Run "'" & OtherWkbk.Name & "'!DoubleClickAction", _ CInt(Target.Column), _ CInt(Target.Row), _ ThisWorkbook.Name, _ sInv, _ Day(Range("A" & Target.Row).MergeArea.Cells(1)) Cancel = True End Sub In Module 1 on other workbook: Option Explicit Public iTD As Integer Public wb1 As Workbook Public Sub DoubleClickAction(ByVal _ TCol As Integer, _ TRow As Integer, _ WhichWkbk As Workbook, _ TVal As String, _ WhichDay As Date) Set iTD = Day(WhichDay) Set wb1 = WhichWkbk Set ws1_1 = wb1.Worksheets("Enter") .... End Sub Any body have any ideas on what went wrong? If you need any other info let me know, I will gladly submit it. Any help is appreciated. -Minitman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing arguments from VBA to DLL | Excel Programming | |||
passing arguments to events | Excel Programming | |||
Passing arguments to VB Function | Excel Programming | |||
Passing Arguments | Excel Programming | |||
Passing arguments to a sub routine... | Excel Programming |