Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-19-2018, 04:01 AM
byrner byrner is offline Insert a number by double Clicking Windows 10 Insert a number by double Clicking Office 2013
Novice
Insert a number by double Clicking
 
Join Date: May 2018
Posts: 2
byrner is on a distinguished road
Default Insert a number by double Clicking

Hi to All
Just stuck with excel and hoping someone can help?
The code below allows me to insert (0) between columns G and I just by left double clicking,


But i need to extend this to columns V . So it works from columns G to V.
I got this formula from another site but don't really understand it but it works
Thanks again to all

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("G:I")) Is Nothing Then Exit Sub
Cancel = True
Target.Value = IIf(Target.Value = "", 0, "")
End Sub

Last edited by Pecoflyer; 05-20-2018 at 12:10 AM. Reason: Added code tags
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert a number by double Clicking How do I insert pictures directly into picture boxes by clicking the box instead of using INSERT>PIC Bree Word 1 06-24-2016 10:32 PM
Insert a number by double Clicking Formula cells are not highlighted when double clicking result hockeytown Excel 2 12-03-2015 09:57 AM
Insert a number by double Clicking Can't open Word files when double-clicking JosieNurse Word 9 04-21-2015 11:31 AM
Problem with page and chapter number appearing when clicking in the scroll bar Tango Mike Word 0 05-05-2014 07:12 AM
Insert a number by double Clicking Insert the Hyperlink and hide all sheets except clicking Hyperlink PRADEEPB270 Excel 1 02-22-2013 09:47 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 PM.


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