Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2020, 03:28 PM
gmaxey gmaxey is offline Pass variables to the 'EditPaste' sub Windows 10 Pass variables to the 'EditPaste' sub Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default


Code:
Sub EditPaste()
  MyEditPaste
End Sub

Sub MyEditPaste(Optional varPassed As String)
  If Not varPassed = vbNullString Then
    MsgBox varPassed
  Else
    Selection.Paste
  End If
End Sub

Sub OtherRoutine()
  MyEditPaste "Test"
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I pass a field as a parameter via a URL? kelvinlewisuk1 Outlook 0 06-30-2016 08:30 AM
Array to iterate through variables and trap blank variables Marrick13 Word VBA 5 08-04-2015 06:19 AM
can word: make variables, find appropriate pages, fill out pages with variables, print only those 20GT Word VBA 1 10-15-2014 09:48 PM
Pass variables to the 'EditPaste' sub How to Pass Document to this Sub ilcaa72 Word VBA 1 01-28-2014 03:04 PM
How to pass parameters to a .msg file? HereNow Outlook 0 11-05-2012 10:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:00 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