Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-09-2018, 02:31 AM
cosmicyes cosmicyes is offline Select a row in a different tab Windows 7 64bit Select a row in a different tab Office 2013
Novice
Select a row in a different tab
 
Join Date: Jan 2018
Posts: 8
cosmicyes is on a distinguished road
Default Select a row in a different tab

Hello,




I wrote a very little VBA-Script.
I have a button in a sheet.
When I click this button I want to select the second row in another sheet to freeze it.


This is my script:
Code:
Sub ErsteZeileEinfrieren() '(2)
    'friert die erste Zeile ein
    Worksheets(1).Activate
    Rows("2:2").Select
    ActiveWindow.FreezePanes = True
End Sub
The line "Rows("2:2").Select however does not work.
I get this error (german):

"Laufzeitfehler '1004':
Die Select-Methode des Range-Objektes konnte nicht ausgeführt werden."



Does anybody have any hints?
Reply With Quote
 

Tags
select row freeze

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select pasted ArtKilp Word 2 08-10-2017 07:23 AM
Cant select shape! Please help! Philosofen Word 1 03-07-2017 07:03 AM
Select a row in a different tab How to select row aymanharake Excel Programming 3 02-18-2017 04:09 PM
Select a row in a different tab How to select different words at once FTL Word 5 03-08-2016 06:10 PM
Select a row in a different tab select all tables majed_m Word VBA 5 07-30-2015 03:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft