Excel forcing me to close the file.

VbMac

New Member
Joined
Oct 27, 2017
Messages
1
Guys,



Help please!

Im trying to figure out what’s the problem here, I’ve checked all the areas but still im getting the same error. Excel keeps on pushing to restart or close my template.


Here’s what happened.

When I have entered a numeric values in my target cell, excel works fine. But if I change it to alphanumeric or any characters other than numbers after I terminate the window that’s when excel forcing me restart or close the template.


Heres the code I’ve wrote:
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

 

If Target.Column = 1 Then

    If Target.Row > 1 Then

 

        With UserForm1

            Dim wb As Workbook

            Dim ws As Worksheet

            Set wb = ThisWorkbook

            Set ws = wb.Sheets(1)

            Dim i, c As Integer

 

            c = 1

            i = ActiveCell.Row

            .TextBox1.Text = ws.Cells(i, c)

            .Show

        End With

 

    End If

End If

 

End Sub

Thank you in advance guys.

Btw, My OS version is Win7 enterprise 32bit and 2010 version 14.0 for my Ms office.
 
Last edited by a moderator:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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