How do i make a button that will place info in a different worksheet?

I am trying to create a time tracker that will be used to track associates time on any given task. I want to set it up so that the buttons to start and stop time are on the first sheet and the actual data being generated is on the next sheet. The code I have […]

Excel VBA – Type mismatch error (Error number 13)

I have written a code which will search the through Column A for a particular element and it will return the cell address of the searched element. But when i execute the code i am getting error number 13 stating Type mismatch. I have gone through whole bunch of codes but still not successful to […]

Copy and Paste Macro to specific Column Ranges

I’ve created a macro in Excel to copy a row in one of my sheets and insert the row into another sheet above the user’s selected row. The macro is as follows and works correctly: Sub addTestProductRow() Sheets(“Macro templates”).Range(“B2:J2”).Copy Selection.Insert Shift:=xlDown End Sub However, I wish to add to this macro to make it only […]

Find cell in range then offset producing error VBA

I need to find a reservation# in a range. Then offset the active cell to the left. I have tried at least 3 different variations form online sources, but I cant get anything to work. Here is what I have so far. Dim FindString As String FindString = Sheets(“Sheet1”).Range(“I1”).Value With Worksheets(1).Range(“H1:H7”) Set C = .Find(FindString, […]

Copy of a variable in VBA

I have a problem. I need the old value of a variable. But when I set a new date for this variable then my string value contains the new value too. How can I solve this in VBA with excel? I know there is the possibility with byRef or byVal. How can I combine this […]

Importing Excel to DataGrid then save to MySQL database

When I import the Excel file into dataGridView1 and click ‘Update’ all the data isn’t storing into my database: Database pic My rota form Code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using System.Data.OleDb; using System.Data.SqlClient; namespace Login { public partial class […]

Run-time error '1004' This file is already open in Protected View

I have a Macro which reads data from another Excel file. If the file is already opened by the user Excel tries to reopen the file – this is fine so far. However if the file is opened in Protected View then the macro stops at this line: Workbooks.Open Filename:=Sheets(“Control Sheet”).Range(“C6”).value With the Error: Run-time […]

Conditional formatting based on time difference

Basically I need to conditionally format a cell (o2) to highlight in red or what ever when its more than two mins different from another cell (d9).

Embedding VBA code in Excel using PHP

We want to embed macro code in excel sheet using php. We are using PHPExcel to generate a excel workbook, which is successfully generated. Now we just want to embed macro code in this excelsheet.

How to Find the the data in another worksheet and place replace the corresponding value using excel VBA

I have two worksheets, in the second worksheet i have defined all the parameters unique name in the first sheet i have defined the just the parameters name, on the click of Auto Fill Button i want it to go and check all the parameters name in the Acronym sheet and if the match is […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.