Closed Thread
Results 1 to 20 of 20

Macro needed for Booking System

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Macro needed for Booking System

    Hi all,

    I chanced upon this thread http://www.excelforum.com/excel-gene...html?p=2879648 while working on a similar project based on the template provided here: http://exceltemplate.net/calendar/ca...l-reservations

    What I want now is to show when the cell is highlighted the name of the person who has booked the room at that time.

    Anyone knows how to write this macro?

    Thanks in advance!

  2. #2
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    any help please???

  3. #3
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Bump no response

  4. #4
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    last bump...

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro needed for Booking System

    You need to add your workbook
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Sorry for the delay...here's my workbook

    Room booking.xls

  7. #7
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    any kind souls who can share some thoughts please???

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro needed for Booking System

    Different method.

    See if this works.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Hi jindon,

    Thanks for your reply!!! I see you have done something (though not exactly sure what) to the sheet such that the formula doesn't show in the "Room Availability Table".

    However, what I actually want is for the name of the person who has booked the room at that time to show up when I hover my mouse over the cell which is highlighted.

    Take your worksheet for example. If I key in 01/01/12, some cells will be highlighted red. If I were to hover my mouse over to say cell D7, I'd like John's name to appear. If there are double reservations, I would like both names to appear and if the reservation is cancelled and the cell turns back to blue then nothing should appear when I hover my mouse over the cell.

    Hope I'm making myself clear?

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro needed for Booking System

    Try the attached
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Hi jindon,

    This is EXACTLY what I want!!!

    However, as far as I can see, you have pasted a macro in Module 1...are there any other macros involved?

    Also I already have a macro in Module 1...can I paste your macro below the existing macro or should I insert another Module?

    Here's my existing macro:

    Please Login or Register  to view this content.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro needed for Booking System

    Quote Originally Posted by geniechua View Post
    Hi jindon,

    This is EXACTLY what I want!!!

    However, as far as I can see, you have pasted a macro in Module 1...are there any other macros involved?

    Also I already have a macro in Module 1...can I paste your macro below the existing macro or should I insert another Module?
    Yes and you also have a codes in both sheets;
    - Availability has Worksheet_Change event code
    - Room Reservation has Worksheet_Deactivate event code

    both is calling "test" sub procedure.
    So, if any change in the range that effect to the result, it will update automatically.

    Check them.
    Last edited by jindon; 08-14-2012 at 10:38 PM.

  13. #13
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Hi jindon,

    I've tried the code on the test workbook (i.e. the workbook posted earlier) and it works fine but when I tried to use it on my actual workbook (with additional macros) I got all sorts of weird errors!

    Here's the actual workbook...

    Room booking.xls

    I've made all the necessary changes (i.e. worksheet / cell reference) but still can't get it to work...what's going on???
    Last edited by geniechua; 08-16-2012 at 09:27 AM.

  14. #14
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Hi jindon,

    While waiting for your reply, I have tried using your file and making some amendments to suit my requirements. However, I'm stuck at 3 items:

    1. For View; Make Reservation sheet, I want to switch the columns for "Room" and "Date" such that "Date" is in column B and "Room" is in column C. I've tried to tweak the codes but nothing works.

    2. I realised that the code won't work if there is an empty row in between 2 room reservations. Can the macros be tweaked such that it would work even if there are empty rows in between?

    3. Is there any reason why the file size has become so big???

    Here's what I've changed so far using your file. Appreciate your advice!

    New_Room bookingVBA.zip

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro needed for Booking System

    I found quite a few posts providing sample workshbook that has different sheet layouts from the actual workbook.

    Why????

    Now you have different sheet names, different data range, different output layouts and merged cell....

    If you think you can adjust the code for yourself, you should be able to write a code for yourself from the scratch already.

    try the attached to see if it works.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Hi jindon,

    So sorry for the trouble and confusion...there is a difference in the worksheets as I was working on the layout of the system while waiting for advice on the comments macros...

    I thought that the workbook I posted yesterday was quite close to what I want...only that I would like the "Date" column in "View; Make Reservation" sheet to be at column B instead of C and the "Room" column to be in column C instead of B.

    I'm not sure what you have changed in the workbook you last uploaded but the "Room" column is still in column B and the "Date" column is still in column C...would you be able to switch the 2 columns and edit the macro so that it works?

    Thanks so much for your patience and help so far!

  17. #17
    Registered User
    Join Date
    07-31-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro needed for Booking System

    Hi jindon,

    For some strange reasons, my earlier reply can't seem to be posted in the forum...

    In any case, so sorry for the trouble and confusion...there is a difference in the worksheets as I was working on the layout of the system while waiting for advice on the comments macros...

    I thought that the workbook I posted yesterday was quite close to what I want...only that I would like the "Date" column in "View; Make Reservation" sheet to be at column B instead of C and the "Room" column to be in column C instead of B.

    I'm not sure what you have changed in the workbook you last uploaded but the "Room" column is still in column B and the "Date" column is still in column C...would you be able to switch the 2 columns and edit the macro so that it works?

    Thanks so much for your patience and help so far!

  18. #18
    Registered User
    Join Date
    08-06-2014
    Location
    Philippines
    MS-Off Ver
    2013
    Posts
    1

    Re: Macro needed for Booking System

    I'm doing a hotel booking. however, i have problems: its taking too slow to update.... any help?

  19. #19
    Registered User
    Join Date
    07-03-2014
    Location
    england
    MS-Off Ver
    2010
    Posts
    2

    Re: Macro needed for Booking System

    hi all,plz provide password to view code
    re
    regards

  20. #20
    Registered User
    Join Date
    07-03-2014
    Location
    england
    MS-Off Ver
    2010
    Posts
    2

    Re: Macro needed for Booking System

    hi plz provide password for the excel to view code
    many thanks

  21. #21
    Registered User
    Join Date
    04-12-2020
    Location
    Saskatchewan
    MS-Off Ver
    2016
    Posts
    1

    Re: Macro needed for Booking System

    Has anyone created the macro code for the edit existing booking Eaton Trevor booking room program -which is missing in his tutorial?

  22. #22
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Macro needed for Booking System

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1