Doubleclick on cell in Protected Sheet

shoheiyuna

New Member
Joined
Dec 3, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi, I have an Excel macro workbook (wb2) that has been password protected (entire workbook including its macros are protected) by a 3rd party which contains a button in a specific cell that I need to double click on it. This Excel workbook is an unsaved workbook that I have to open via a macro ribbon everytime I run it. (It's actually GLWand)

I've written a macro in a separate Workbook (wb1) to fill in the parameters required in wb1, what I can't figure out is the code to double click the button.

In wb1.Sheet1, I've included the public sub:

VBA Code:
Public Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

  
End Sub

In wb1 Module, this is my code. It's not great as I'm still new to macro, but everything so far works up till second last line to select cell F39 in wb2 which contains the button. But I can't seem to activate the doubleclick on it. The doubleclick will allow the macro in wb2 to run. I can't call the macro in wb2 because it's password protected. Really appreciate all help on this, thank you!

VBA Code:
Sub GLWand_1()
'
' GLWand_1 Macro
'

    Dim wb As Workbook
    Set wb = Workbooks("Setup.xlsm")
    
    Dim wb2 As Workbook
    Set wb2 = Workbooks(2)
    
    Dim ws As Worksheet
    Set ws = wb.Sheets("Parameters")
    
    Dim ws2 As Worksheet
    Set ws2 = wb2.Sheets("Criteria")
    
    ws2.Cells(7, 4) = ws.Cells(4, 3)
    ws2.Cells(8, 4) = ws.Cells(5, 3)
    ws2.Cells(9, 4) = ws.Cells(6, 3)
    ws2.Cells(14, 4) = ws.Cells(8, 3)
    ws2.Cells(15, 4) = ws.Cells(9, 3)
    ws2.Cells(16, 4) = ws.Cells(10, 3)
    ws2.Cells(17, 4) = ws.Cells(11, 3)
    ws2.Cells(18, 4) = ws.Cells(12, 3)
    ws2.Cells(19, 4) = ws.Cells(13, 3)
    ws2.Cells(20, 4) = ws.Cells(14, 3)
    ws2.Cells(35, 4) = ws.Cells(15, 3)
    
    ws2.Activate
    Range("F39").Select
    Call Sheet1.Worksheet_BeforeDoubleClick(Selection, False)
 
    
End Sub
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
In how many more sites have you posted this question?
 
Upvote 0
In how many more sites have you posted this question?
Only on ExcelForum and MrExcel. Should I remove one of them?
 
Upvote 0
No, you don't have to. I am not an administrator or equivalent so I am not allowed to say anything about it but you should always show the hyperlink to all other sites in each first post.
 
Upvote 1

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top