VBA ISSUE

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
608
I am running the same VBA code I have for several years. All of a sudden I started getting "Run-time error '1004': Method 'Range' of object '_Global' failed. The code it was executing was:
Code:
Range("B4").select
I suspect it may have something to do with a recent auto-update and maybe something with the references I am using in the VBA editor. Right now the only Checked references are:
Visual Basic for Applications
Microsoft Excel 16.0 Object Library
OLE Automation
Microsoft Office 16.0 Object Library
Microsoft Forms 2.0 Object Library

I do not know what to do. I have a .xlsa file in the XLSTART folder and have recompiled it. Any suggestions would be greatly appreciated.
I am currently using Excel for Microsoft 365 MSO (16.0.12827.20328) 64-bit. And I am running Windows 10.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Are you sure that cell B4 isn't hidden, protected, or part of a merge cell?

What if you open a new workbook, and just try this simple macro:
VBA Code:
Sub Test()
    Range("B4").Select
End Sub
 
Upvote 0
Are you sure that cell B4 isn't hidden, protected, or part of a merge cell?

What if you open a new workbook, and just try this simple macro:
VBA Code:
Sub Test()
    Range("B4").Select
End Sub
I tried that. It worked fine. Several other files seem to work fine. I am going to reconstruct the offending file and see if that solves my problem. A lot of work involved unfortunately.
 
Upvote 0
I seem to have solved the issue. I moved the file to my hard drive, exported he 2 VBA modules. Added the VBA modules back in. It seems fine now.
 
Upvote 0

Forum statistics

Threads
1,214,539
Messages
6,120,100
Members
448,944
Latest member
SarahSomethingExcel100

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