SquareJerBear
New Member
- Joined
- Jan 27, 2020
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hello all,
I am a VBA novice, so any help is much appreciated.
I am trying to help a charge nurse come up with a better way to update the cardex for different patients, other than just using pencil and paper.
What I would like to have happen is this:
The nurse would open an excel workbook that has a main sheet. That sheet would have a checkbox for each room. When you click that box, a page from a separate template is added inline, that is, on the same worksheet.
The nurse would fill out the info for that patient, and update it. Then when the patient leaves, she unchecks the box for that room, and that page is removed. A new patient arrives, and then she checks the box again. The template is re-added, but is once again blank.
For ease of use, I would like for there to be some way for it to stay in order.
I have researched for a few days, found something like this:
This would work for someone like me, but the staff aren't that computer savvy. My goal is to make it accessible for staff with a lower level of comfort with Excel.
Does anyone have any suggestions for how to do this in VBA, or if not, if I should pursue something else?
Thanks!
I am a VBA novice, so any help is much appreciated.
I am trying to help a charge nurse come up with a better way to update the cardex for different patients, other than just using pencil and paper.
What I would like to have happen is this:
The nurse would open an excel workbook that has a main sheet. That sheet would have a checkbox for each room. When you click that box, a page from a separate template is added inline, that is, on the same worksheet.
The nurse would fill out the info for that patient, and update it. Then when the patient leaves, she unchecks the box for that room, and that page is removed. A new patient arrives, and then she checks the box again. The template is re-added, but is once again blank.
For ease of use, I would like for there to be some way for it to stay in order.
I have researched for a few days, found something like this:
VBA Code:
Sub copy_Sheet()
Dim wb As Workbook
Dim activeWB As Workbook
Dim FilePath As String
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set activeWB = Application.ActiveWorkbook
FilePath = "D:\General Required Docs\DATA.xlsm"
On Error Resume Next
Set wb = Application.Workbooks.Open(FilePath)
wb.Worksheets(1).Copy After:=activeWB.Sheets(activeWB.Sheets.Count)
activeWB.Activate
wb.Close False
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
This would work for someone like me, but the staff aren't that computer savvy. My goal is to make it accessible for staff with a lower level of comfort with Excel.
Does anyone have any suggestions for how to do this in VBA, or if not, if I should pursue something else?
Thanks!