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: 293
Default 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
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
Passing arguments from VBA to DLL [email protected] Excel Programming 10 August 18th 06 09:08 AM
passing arguments to events Paul Excel Programming 2 May 24th 06 03:18 PM
Passing arguments to VB Function Tom Excel Programming 1 March 29th 06 01:19 AM
Passing Arguments Grant Reid Excel Programming 8 May 24th 04 01:39 PM
Passing arguments to a sub routine... Jeff Harbin[_2_] Excel Programming 2 January 29th 04 03:25 AM


All times are GMT +1. The time now is 09:19 PM.

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"