JLeech1992
New Member
- Joined
- Nov 22, 2022
- Messages
- 9
- Office Version
- 2016
- Platform
- Windows
Hi all,
I am new to VBA coding, I don't fully understand some aspects of coding and I'm still learning so please bare with me on this, I am in the middle of making an inventory control workbook with Microsoft Excel to manage my works returns inventory and workload. I'm currently trying to create buttons to hide and unhide sheets to impersonate actual buttons, keep my workbook tidy and just have my Dashboard visible on start up.
On the Dashboard I have the following buttons to apply macros:
- Inventory (In this sheet I will also have 3 buttons needing Macros, Aisle G Inventory, Aisle H Inventory and Inbound Inventory)
- Pending Area
- Testing Overview
- Product Catalogue
- FSE Index
- Branch Index
- Collections
- Meeting Queries
(Every sheet will have a back button to direct me back to the dashboard with all the sheets hidden)
What i wanted to happen previously: (The code I've been trying to solve)
- Click 'Pending Area" button = Unhides 'Pending Area' - instantly directs me to 'Inventory'
- Click 'Back' button = Hides 'Pending Area' - instantly directs me to 'Dashboard'
What i want to happen now: (The previous code but updated and now trying to achieve)
- Click 'Pending Area" button = Unhides 'Pending Area' - instantly directs me to 'Pending Area' - Hides 'Dashboard'
- Click 'Back' button = Unhides 'Dashboard' - instantly directs me to 'Dashboard' - Hides 'Pending Area'
(I want this to happen with each sheet individually)
I have done some online research in regards of doing this and found some threads and youtube video tutorials, which has kind of helped but I'm at a standstill due to a 'Compile Error: Expected: Identifier'.
I have followed someone's instructions via a youtube video tutorial and i consistently come to this error (Even though it was working perfectly fine on the tutorial video). I have done research on this error also, during this i found out that it indicates multiple reasons why I receive this error and I cant seem to find/understand where I have gone wrong in the coding or cross reference my coding to the similar issues stated in threads.
My coding what i wanted to happen previously is:
Option Explicit
Sub ViewPendingArea()
Sheets("Pending Area").Visible = True
Sheets("Pending Area").Select
End Sub
Sub HidePendingArea()
Sheets("Pending Area").Visible = False
End Sub
The coding what i want to happen now is:
I haven't created this yet due to the error I'm receiving with my previous coding, I want to understand where i have went wrong with my previous coding before I update it to my new one. *What i want to happen now is stated above*
Compile Error: Expected: Identifier indications:
I understand that when I receive this error, the debugger will appear and highlight the issue in yellow.
Here is what i receive:
Option Explicit
> Sub ViewPendingArea()
Sheets("Pending Area").Visible = True
Sheets("Pending Area").Select
End Sub
Sub HidePendingArea()
Sheets("Pending Area").Visible = False
End Sub
Keep in mind that I am still learning how to use VBA and some aspects i don't fully understand so i may not understand everything you explain, so please try and simplify your replies.
I would like someone with professional experience to advise me, Any advice or guidelines will be much appreciated. thank you.
I am new to VBA coding, I don't fully understand some aspects of coding and I'm still learning so please bare with me on this, I am in the middle of making an inventory control workbook with Microsoft Excel to manage my works returns inventory and workload. I'm currently trying to create buttons to hide and unhide sheets to impersonate actual buttons, keep my workbook tidy and just have my Dashboard visible on start up.
On the Dashboard I have the following buttons to apply macros:
- Inventory (In this sheet I will also have 3 buttons needing Macros, Aisle G Inventory, Aisle H Inventory and Inbound Inventory)
- Pending Area
- Testing Overview
- Product Catalogue
- FSE Index
- Branch Index
- Collections
- Meeting Queries
(Every sheet will have a back button to direct me back to the dashboard with all the sheets hidden)
What i wanted to happen previously: (The code I've been trying to solve)
- Click 'Pending Area" button = Unhides 'Pending Area' - instantly directs me to 'Inventory'
- Click 'Back' button = Hides 'Pending Area' - instantly directs me to 'Dashboard'
What i want to happen now: (The previous code but updated and now trying to achieve)
- Click 'Pending Area" button = Unhides 'Pending Area' - instantly directs me to 'Pending Area' - Hides 'Dashboard'
- Click 'Back' button = Unhides 'Dashboard' - instantly directs me to 'Dashboard' - Hides 'Pending Area'
(I want this to happen with each sheet individually)
I have done some online research in regards of doing this and found some threads and youtube video tutorials, which has kind of helped but I'm at a standstill due to a 'Compile Error: Expected: Identifier'.
I have followed someone's instructions via a youtube video tutorial and i consistently come to this error (Even though it was working perfectly fine on the tutorial video). I have done research on this error also, during this i found out that it indicates multiple reasons why I receive this error and I cant seem to find/understand where I have gone wrong in the coding or cross reference my coding to the similar issues stated in threads.
My coding what i wanted to happen previously is:
Option Explicit
Sub ViewPendingArea()
Sheets("Pending Area").Visible = True
Sheets("Pending Area").Select
End Sub
Sub HidePendingArea()
Sheets("Pending Area").Visible = False
End Sub
The coding what i want to happen now is:
I haven't created this yet due to the error I'm receiving with my previous coding, I want to understand where i have went wrong with my previous coding before I update it to my new one. *What i want to happen now is stated above*
Compile Error: Expected: Identifier indications:
I understand that when I receive this error, the debugger will appear and highlight the issue in yellow.
Here is what i receive:
Option Explicit
> Sub ViewPendingArea()
Sheets("Pending Area").Visible = True
Sheets("Pending Area").Select
End Sub
Sub HidePendingArea()
Sheets("Pending Area").Visible = False
End Sub
Keep in mind that I am still learning how to use VBA and some aspects i don't fully understand so i may not understand everything you explain, so please try and simplify your replies.
I would like someone with professional experience to advise me, Any advice or guidelines will be much appreciated. thank you.