VBA ISSUE

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
591
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.
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
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
 

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
591
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.
 

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
591
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.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
Glad to hear it!
 

Watch MrExcel Video

Forum statistics

Threads
1,127,321
Messages
5,624,011
Members
416,004
Latest member
reitz1

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
Top