|
-
Jun 8th, 2010, 05:31 PM
#1
Thread Starter
New Member
Run Time Error 1004
I have a user getting a run time error from the following code, but I can't see how - any suggestions?
Private Sub buttonViewPatient_Click()
Application.ScreenUpdating = True
ActiveWindow.DisplayWorkbookTabs = True
Sheets("data").Select
End Sub
-
Jun 9th, 2010, 01:11 AM
#2
Addicted Member
Re: Run Time Error 1004
hi, dseaforduk.. looks like the code you posted is okay..so i suppose the error is not coming from that code..
The taller the bamboo grows the lower it bends... 
-
Jun 9th, 2010, 02:53 AM
#3
Re: Run Time Error 1004
Welcome to the forums dseaforduk 
You will get that error if Sheets("data") is hidden. Change your code to this...
Code:
Private Sub buttonViewPatient_Click()
Application.ScreenUpdating = True
Sheets("data").Visible = True
Sheets("data").Activate
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jun 9th, 2010, 03:23 AM
#4
Thread Starter
New Member
Re: Run Time Error 1004
Thanks for the feedback
The sheet is not hidden, tab names are, I will try Activate rather than Select.
-
Jun 11th, 2010, 01:45 AM
#5
Junior Member
Re: Run Time Error 1004
Use debugger to find error. When error show click debug and press F8 to make step in. Or toggle breakpoint in ur vba code and do f8 and check what data is setted to variable. Always u can use Error Handlers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|