MsgBox from a range of values

Matt New

New Member
Joined
Jan 1, 2016
Messages
13
Hi everyone! First timer on the boards, please don't bite

I have a spreadsheet I'm using for "sign-in" function, using a barcode scanner. I'm not worried about that part, I have it setup and ready to go.

However, I'd like to have a sheet I can use to have pop-up messages when specific users sign-in. Ie, user 10001 logs in, a specific message pops up. User 10002 logs in, no message. the next day, user 10001 may not have a message, but 10002 does.

I'd like to be able to have a table where I (or another admin, non-excel-person) can essentially enter IDs and the appropriate message on a spreadsheet, and have the code reference that sheet. Is that possible?

I don't have any real VBA experience, just borrowing code where I find them to fit my needs. Let me know if you need more details on how the sheet is setup!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
thank you very much!

I looked at the code again. I don't see anything different, but for some reason, it works now... I'll just chalk it up to your magic touch!

Thank you both for your time with this project, I appreciate it very much.
 
Upvote 0
on another note - I figured out what I did wrong with the code. I had decided to remove the name from the comment sheet, I felt it was a bit of clutter and wanted to see without it. As such, the msg variable (offset 2) was pulling from blank cells, and the UserName variable was pulling from the column which now contained the msg information. Hence, the message was in the title of the box, and the body had no content.

rookie mistake!
 
Upvote 0
on another note - I figured out what I did wrong with the code. I had decided to remove the name from the comment sheet, I felt it was a bit of clutter and wanted to see without it. As such, the msg variable (offset 2) was pulling from blank cells, and the UserName variable was pulling from the column which now contained the msg information. Hence, the message was in the title of the box, and the body had no content.

rookie mistake!


LOL! Thing is that

a) You tried to modify the code
b) You made a mistake but have now realised what that was

both of which mean that you have learnt from this which is what it's all about! When I started coding a few years back, I was hopeless and came on here hoping for easy solutions, and was helped, but also pointed towards learning how to do things for myself. This has paid off - I've just done a Workbook for myself (along with my OH, I run a dog boarding business and we need a spreadsheet for creating bookings, working out rates etc) and it's taken me a month of on and off tinkering to get it perfect, but I'm pleased because I've done it all myself. :)
 
Upvote 0

Forum statistics

Threads
1,216,744
Messages
6,132,469
Members
449,729
Latest member
davelevnt

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