Column Beep

joelmidiowa

New Member
Joined
Dec 16, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I have an excel sheet that i need to have column A and K beep when i type in an account number. I need beep to go all the way down both column A and K. not at the same time just when an account number is typed in
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
This is sheet code for the sheet of interest. Assumes typed entries to both columns A and K will always be account numbers.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Set Target = Target(1)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
    If Not IsEmpty(Target) Then Beep
End If
If Not Intersect(Target, Range("K:K")) Is Nothing Then
    If Not IsEmpty(Target) Then Beep
End If
End Sub
 
Upvote 0
I copied and pasted your code into the vba module, but when I type in an account number into column A or K it does not beep
 
Upvote 0
The code doesn't go into a standard module. It's sheet code. remove the code you pasted, then follow the instructions below:

To install sheet code:
1. Right-click the worksheet tab you want to apply it to and choose 'View Code'. This will open the VBE window.
2. Copy the code below from your browser window and paste it into the white space in the VBE window.
3. Close the VBE window and Save the workbook. If you are using Excel 2007 or a later version do a SaveAs and save it as a macro-enabled workbook (.xlsm file extension).
4. Make sure you have enabled macros whenever you open the file or the code will not run.
 
Upvote 0
So I am trying to use this same code through the online excel app on OneDrive. Should this code also work on the web version also, do you know by chance?
 
Upvote 0
I have no experience with the online Excel app, but I believe it does not support VBA.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,886
Messages
6,122,093
Members
449,064
Latest member
Danger_SF

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