+ Reply to Thread
Results 1 to 2 of 2

How to run macro in excel using private sub below coding

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    Chennai
    MS-Off Ver
    365
    Posts
    1

    How to run macro in excel using private sub below coding

    I’m just a beginner , please help

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Range("$E$3").Value = "Selection A" Then
    Range("$L$3").Value = Sheets("sheet2").Range("$M$4").Value
    With Range("L3:R4").Validation
    .Delete
    .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
    xlBetween, Formula1:="=selection_a"
    .IgnoreBlank = False
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = ""
    .InputMessage = ""
    .ErrorMessage = ""
    .ShowInput = True
    .ShowError = True
    End With
    End If

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: How to run macro in excel using private sub below coding

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    BSB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. excel macro to create outlook message - with Private sensitivity
    By aarona in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2017, 02:22 AM
  2. VBA and Macro Coding Required for Excel 2010
    By aks9389 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2013, 02:00 AM
  3. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-02-2013, 11:16 PM
  4. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-02-2013, 05:04 AM
  5. [SOLVED] Please give me the VB macro coding for excel:???
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2013, 06:17 AM
  6. SQL Server into Excel via Macro via Private Sub Workbook_Open
    By johnph in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2013, 02:04 PM
  7. Can i see the excel coding with out macro?
    By ramkumar_cpt in forum Excel General
    Replies: 5
    Last Post: 11-22-2005, 12:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1