Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-17-2016, 04:18 AM
Philb1 Philb1 is offline passing variable from one sub to another Windows 10 passing variable from one sub to another Office 2010 32bit
Advanced Beginner
 
Join Date: Feb 2016
Location: Auckland
Posts: 43
Philb1 is on a distinguished road
Default

Hi

Try changing the code to the below & see if it works for you. I've extracted bits of your code & changed it
Cheers

Code:
'==========================
Private Sub Worksheet_BeforeDoubleClick _
  (ByVal Target As Range, _
    Cancel As Boolean)
    
Dim Position As String

  Position = Target.Address
  
      TempCombo_LostFocus Position
        
errHandler:
  Application.EnableEvents = True
  Exit Sub

End Sub
'=========================================
Private Sub TempCombo_LostFocus(ByVal Position As String)

MsgBox (Position)

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
passing variable from one sub to another userform help (having trouble passing info from form to macro) cyraxote Word VBA 16 09-08-2015 04:16 AM
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge Berryblue Mail Merge 1 11-13-2014 05:36 PM
passing variable from one sub to another Run-time error 91 object variable or with block variable not set JUST ME Word VBA 4 03-25-2014 06:56 AM
passing variable from one sub to another object variable or with block variable not set MJP143 Excel 1 02-11-2013 05:07 AM
passing variable from one sub to another Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft