Skip to main content

VBA excel automatic date when value add

 In Microsoft Excel, you can use Visual Basic for Applications (VBA) to automatically enter a date in a cell when a value is added. Here's an example of how you can do this: Press Alt + F11 to open the VBA editor. Right-click the sheet tab where you want to add the date, then select "View Code". In the code editor, paste the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A1:A10")) Is Nothing Then Target.Offset(0, 1).Value = Date End If End Sub Close the code editor by clicking the "X" in the top-right corner. This code will automatically enter the current date in the cell next to the active cell whenever a value is added in the cells from A1 to A10. If you want to change the range of cells, you can modify the range in the line "If Not Intersect(Target, Range("A1:A10")) Is Nothing Then". Note: This code works in all recent versions of Micr

HTML code for Admin dashboard

 <!DOCTYPE html>

<html>

<head>

  <title>Admin Dashboard</title>

</head>

<body>

  <header>

    <nav>

      <ul>

        <li><a href="#">Home</a></li>

        <li><a href="#">Users</a></li>

        <li><a href="#">Reports</a></li>

        <li><a href="#">Settings</a></li>

        <li><a href="#">Logout</a></li>

      </ul>

    </nav>

  </header>

  <main>

    <h1>Welcome to the Admin Dashboard</h1>

    <p>Here you can manage users, view reports, and update settings.</p>

    <section>

      <h2>Recent Users</h2>

      <table>

        <tr>

          <th>Name</th>

          <th>Email</th>

          <th>Actions</th>

        </tr>

        <tr>

          <td>John Doe</td>

          <td>johndoe@example.com</td>

          <td>

            <a href="#">Edit</a>

            <a href="#">Delete</a>

          </td>

        </tr>

        <tr>

          <td>Jane Smith</td>

          <td>janesmith@example.com</td>

          <td>

            <a href="#">Edit</a>

            <a href="#">Delete</a>

          </td>

        </tr>

      </table>

    </section>

  </main>

</body>

</html>

This is a very basic example and there are many other things that you can add to a admin dashboard like using CSS for styling the HTML , using JavaScript for dynamic behavior, and connecting to a database to populate the data.

Also, this is just a static HTML page and you would need a server-side technology like PHP, Ruby, Python, etc to interact with a database and perform server-side actions like adding, editing, and deleting users.

Comments

Popular posts from this blog

Multiple Find and Replace word document using VBA

On the File tab, go to Options > Customize Ribbon. Under Customize the Ribbon and under Main Tabs, select the Developer check box. After you show the tab, the Developer tab stays visible, unless you clear the check box or have to reinstall a Microsoft Office program. The Developer tab is the place to go when you want to do or use the following: 1. Write macros. Sub ReplaceFromTableList() Dim oChanges As Document, oDoc As Document Dim oTable As Table Dim oRng As Range Dim rFindText As Range, rReplacement As Range Dim I As Long Dim sFname As String 'Change the path in the line below to reflect the name and path of the table document sFname = "C:\Users\admin\Documents\FindReplaceTable.docx" Set oDoc = ActiveDocument Set oChanges = Documents.Open(FileName:=sFname, Visible:=False) Set oTable = oChanges.Tables(1) For I = 1 To oTable.Rows.Count Set oRng = oDoc.Range Set rFindText = oTable.Cell(I, 1).Range rFindText.End = rFindText.End - 1 Set r

Sales promotion marketing

Sales promotion marketing refers to a variety of short-term incentives that are designed to encourage customers to make a purchase or take some other desired action. These incentives can include discounts, coupons, free samples, contests, and other similar promotions. Sales promotion marketing is often used as a complement to other forms of marketing, such as advertising and public relations, to increase sales and drive revenue. One of the key benefits of sales promotion marketing is that it can be used to drive short-term results. For example, a business may use a discount or coupon promotion to increase sales during a slow period, or to clear out inventory. Sales promotions can also be used to attract new customers, or to encourage repeat business from existing customers. There are several types of sales promotion strategies that can be used, including: Price promotions: This includes discounts, coupons, and other incentives that are based on price. Premium promotions: This includes

VBA excel automatic date when value add

 In Microsoft Excel, you can use Visual Basic for Applications (VBA) to automatically enter a date in a cell when a value is added. Here's an example of how you can do this: Press Alt + F11 to open the VBA editor. Right-click the sheet tab where you want to add the date, then select "View Code". In the code editor, paste the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A1:A10")) Is Nothing Then Target.Offset(0, 1).Value = Date End If End Sub Close the code editor by clicking the "X" in the top-right corner. This code will automatically enter the current date in the cell next to the active cell whenever a value is added in the cells from A1 to A10. If you want to change the range of cells, you can modify the range in the line "If Not Intersect(Target, Range("A1:A10")) Is Nothing Then". Note: This code works in all recent versions of Micr