In a folder I have 2 excel files the the first file called products & contains sheets with the names of each product, in each product sheet I recorded the names of some customers.
The second file is called customers & contains sheets with the names of each customer.
when both files are open & I am in the products file I want to be able to select a product lets say shampoo double click on one of the customers & automatically go to the specified customer in the customers file.
I inserted this code in every sheet of products file & things went fine:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
For Each wb In Workbooks
For Each wk In wb.Worksheets
If wk.Name = Target.Value Then
MyWin = wb.Name
Instead of inserting this code on every sheet module (I might have 60 sheets) I tried to insert it
Just In Thisworkbook module but it didn’t work:
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
For Each wb In Workbooks
For Each wk In wb.Worksheets
If wk.Name = Target.Value Then
MyWin = wb.Name
I have a Shared Workbook that 10 or 15 users are in and out of all day. In Column A on a few sheets I have a Before Double Click Event that launches a userform. The macro works for all users except this one person. I have tried several things:
1. I closed the file and Reopened it, to make sure that the user did not disable macros.
2. I checked the file on other users computers to see if the file was working properly (It was.)
3. I went to Options>Trust Center>Trust Center Settings>Macro Settings and Enabled All Macros on this User's system
None of these actions corrected the issue.
The purpose of the BeforeDoubleClick Event is to store Columns A:E data and then let the user add more information through the form. Once the User fills out the UserForm. A:E is transferred to one of a number of sheets depending on criteria in the UserForm. A:E is transferred along with the new information that the user has entered in the UserForm.
Another symptom is that on other computers when the Before Double Click Event is activated the Userform launches and the cursor does not appear in the cell until after the User Clicks a Command Button to Update Data on the Userform. On this individual's computer the cursor does appear in the cell without the Userform launching....
i am working on a pivot report and it works fine so far, but the only thing i am trying to do here is when duble click on a total it opens a new sheet with the report needed but it names the sheet as sheet1 and so on (sheet2,3,4...)
is there a way when i duble click a total it automaticly names the sheet for me?
I am trying to do is use VBA to move from the diagram directly to the macro number. The Cells on the Diagram have functions in them and there is no reference to what macro goes with which function. My list loocs like this
The diagram is a 20 by 20 grid of cells that correspond to macros I have a third sheet that has the macro numbers listed in the same format as the diagram. The problem I have is how to read the corresponding macro number from Sheet 3 then find that number on Sheet 2.
I have spreadsheet with client names. I'd like to build logic that will open a form with client information when a user double-clicks on the client name. But I have a couple of problems.
- First, I'd like to protect the sheet and hide the formulas. But when I protect the sheet, I get the "the cell or chart you are trying to change is protected" error when I double click the protected cell.
- If I deselect the "Select Locked Cells" options when I protect the sheet, I no longer have the ability to double-click on the cell.
how I can double click on a cell yet not allow the user to edit the cell (or see the formula)?
Upon clicking any cell in Sheet1, it will automatically filter based on cell A and B.
Automaticall display filtered criteria based on double click from Sheet1
For example: when I double click on C1, on Sheet2 will automatically diplay filtered data based on A1 and B1 and same thing goes to if I double clik on C2 on Sheet2 will automatically diplay filtered data based on A1 and B2.
I am trying to create a data entry sheet to enter quotes on. When a quote is received, I click on my "Add quote" button and a userform appears. Data is entered into the userform (frmEntryForm) and returned back to the next available row.
I also need to be able to:
Edit a row by double-clicking it. When a row is double-clicked, data from that row is passed back to the userform, edited and returned back to the same row (to prevent duplicates).Validate that all fields are complete within the userform where relevant (i.e. if the work is not complete or in progress then the "Invoice Number" and "Actual Cost" fields are disabled and blanked to prevent entry (I think this is almost sorted judging by my tests)
I have attached my sheet : 2014 Gatwick Quote Log (Macro Enabled).xlsmâ€Ž
Is there any way, through VBA code, to click a button on a sheet in another workbook. This button has a macro assigned to it. What I need to be done is this :- the workbook which has the button is open. The code should click the button on a specific sheet. On this action, the macro assigned to the button should get called.
I could just call the macro which is assigned to the button in this code. But the requirement is that the button click operation should call the macro.
I have found that one can do quite a lot with the code, but this seems to be one a whole different level. I came across a possible solution in the below mentioned link but it doesnt seem to be working for me. [URL]
I am trying to write some questions on cells of Sheet1 of a workbook. Then I want to write the answers on cells of Sheet2 of the same workbook. I want the user to be able to double click the question-cell on Sheet1 and be taken to the respective answer on Sheet2.
I have a spreadsheet that just uses the basic "SUM" function. This morning I went to use it and the function does not work after I change a number within the field of that function. If, however, I go into the SUM function and double click, then hit enter, it does the new calculation.
I have this list of all rangenames in my workbookin column A:A
For some reason I want to doubleclick on the rangename in the list to activate this range.
The reason is that I want more smooth activation-prosess; The Excel Range List is too long to practical use as a direct lookup, so I want to activate directly from my own list (where i have added definitions to the range names.
I have tried to build a hyperlink formula, but failed. Maybe the macro below can be modified to do the job, but I am stuck here as well.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim RangeName Application.ScreenUpdating = False If Target.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A:A")) Is Nothing Then Cancel = True
I seem to have broken something!. Whenever I double-click to open an Excel file (.xls files are associated correctly), Excel opens, but nothing happens. That status bar says "Ready," but my workbook never appears.
If I do a File-> Open within Excel, then I am able to open the workbook. I have no idea what is going on. This occurs for all Excel files whether they contain macros or not.
I have a code for doubleclick on a cell and a gdt application chart will open.
Private Sub Worksheet_BeforeDoubleClicK(ByVal Target As Range, Cancel As Boolean) ActiveSheet.Unprotect ThisWorkbook.Unprotect Dim i As Integer Dim gdt As Long Dim S As String Cancel = True With Application
If Target.Address(False, False) "C11" Then Exit Sub
'Place your direct path to open this GDT application
S = "C:Documents and SettingsUserMy DocumentsAndy's MachineINSPECTIONGDTGDT BitmapGD&T_Font.exe"
If Dir(S) = "" Then MsgBox "File does not exist:" & vbCrLf & S, vbCritical, "Error" Exit Sub End If gdt = Shell("""" & S & """", vbNormalFocus)
ActiveSheet.Protect ThisWorkbook.Protect End Sub What would the code be for a range of cells if doulbe clicked the range would be C11 thru C35
Also, I have a double click code for another symbol chart to open.
How, would this be used in the same manner if a coulmn or row were to apply on double click.
on the worksheet there are six ranges...each range has three columns...the first is team name, the second is rep name, and the third is the metric being measured.
what i would like to happen is...
when a team name is double clicked in any one of the ranges, i would like all three cells (team name, rep name, and metric) to be boldfaced and have the cell interior change color for all instances across all six ranges that match the team name double clicked. when double clicked again, it should go back to original formatting.
likewise, when a rep name is double clicked in any one of the ranges, i would like all three cells (team name, rep name, and metric) to be boldfaced and have the cell interior change color for all instances across all six ranges that match the rep name double clicked. when double clicked again, it would go back to original format.
so for example, if i happen to click on a cell in the team column in the second range for "team a", all cells in each range (including the adjacent cells for rep and metric) would be highlighted.
I have populated a listbox from a filtered list and when 'Double Clicking' a name I want a macro to run. All seems to be OK apart from it is not finding/returning any data; I know the data is there and I think it may be the way I'm referencing the listbox value;
Dim DestSheet As Worksheet Set DestSheet = Worksheets("Clients to Invoice")
Dim sRow As Long 'row index on source worksheet Dim dRow As Long 'row index on destination worksheet Dim sCount As Long sCount = 0 dRow = 1...................
I am trying to create code so that when a cell in Column C (for example C1) is double clicked, it makes the font bold, italicized, blue and inserts a row below the double clicked cell. I am also trying to make it so that if the cell is double clicked again, it removes the bold, italics, blue and deletes the row that was previously inserted.
Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Excel.Range, Cancel As Boolean) If Target.Font.Bold Then ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select Selection.Insert Shift:=xlDown ActiveCell.Select Cancel = True If Not Target.Font.Bold Then ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select Selection.Delete Shift:=xlUp ActiveCell.Select Cancel = True End If End If End Sub
I want a X to be put in the activecell if empty or removed if already there. By searching this forum I found and read the article "Adding a Command Button to the Excel Right Click Pop-up Toolbar/Command Bar" and was able to add the code to do this to the right click sub menu. Is there a way to do the same thing by double clicking on the cell? This probably seems a bit nit pickey but I would just like for it to work using double click for my users. I wrote the following code to performe the action
Sub Toggle_Macro() If IsEmpty(ActiveCell) = True Then ActiveCell.Value = "X" With Selection .HorizontalAlignment = xlCenter End With With Selection.Font .Name = "Arial" .FontStyle = "Bold" .Size = 12 .ColorIndex = 3 End With Else: Selection.ClearContents End If End Sub
And placed the code below in Private Module of the Workbook Object.................
I am trying to run a macro when I double click on a certain cell (D34). The cell has data in it (Southeast NSC). What I am expecting to happen is once I double click on the cell the macro will run the retrieve and I will end up at expense chart page.
The macro I am trying to run is an Essbase retrieve.
Testing my worksheet, I found that if I double click on any cell that is not locked, the worksheet becomes unprotected. I need to prevent this from happening. I tried the following code, but it didn't work.
I'm using a little sub routine to bring up a pop up calendar when i click in a cell, everythings lovely but it annoyingly comes up when i select a clolumn or row that also contains that cell. modification to require a double click to display the calendar?
I have a sheet with some 300 plus rows of data. I use filters to sort through the rows to get down to anywhere from 8 to 10 or so rows. At that point I would like to be able to select (doule click) a filtered row of 10 cells (A:J) copy the data and paste it to a different sheet starting with cell B18. I want to be able to perform this process up to 5 seperate times.
I have recorded a macro to do basically what I am trying but with many short falls. It only selects one row, I cannot double click on a row and it dosen't always paste to the proper cell.
I want to be able to double click on a cell in a column. If it has a certain word in it, it will take it to that worksheet. Auto filters are used so these cells can move in a column at any time. This is why I am looking for a code to validate the contents in the cell first.
ie. Cell has the word: BSALT, when double clicked it will take it to the BSALT worksheet.
Cell has the word MLW, when double clicked it will take it to the MLW worksheet.
And so on.
These values are in one column only. If they weren't able to be autofiltered i could do it, but the mere fact that they can move around is giving me trouble.