Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default hiding a row

I'm a newbe with Excel vb. I've done a lot of vb with word but, have a
project with excel.
I have a spreadsheet which gets populated upon open like so:
Private Sub Workbook_Open()

Set objIRConn = CreateObject("irdesktopcontrol.irdesktopcontrolx")
objIRConn.Active = True

'Compnay
If Sheet1.Cells(4, 7) = "" Then
strCo = objIRConn.Filename
Sheet1.Cells(4, 7) = strCo
End If

What I want to do is hide row a90 if this is blank.
The Sheet is protected.

Thanks,
Bryan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default hiding a row

I believe this will work.

If Sheet1.Range("A90") = "" Then
Sheets("Sheet1").Unprotect
Rows(90).Hidden = True
Sheets("Sheet1").Protect
End If






"bryan" wrote in message
...
I'm a newbe with Excel vb. I've done a lot of vb with word but, have a
project with excel.
I have a spreadsheet which gets populated upon open like so:
Private Sub Workbook_Open()

Set objIRConn = CreateObject("irdesktopcontrol.irdesktopcontrolx")
objIRConn.Active = True

'Compnay
If Sheet1.Cells(4, 7) = "" Then
strCo = objIRConn.Filename
Sheet1.Cells(4, 7) = strCo
End If

What I want to do is hide row a90 if this is blank.
The Sheet is protected.

Thanks,
Bryan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default hiding a row

Almost...
What I am using is :
If Sheet1.Cells(7, 3) = "" Then
Sheets("Sheet1").Unprotect
Rows(90).Hidden = True
Sheets("Sheet1").Protect
End If

How can I do this without having the user input the password?

Thanks,
Bryan
"JLGWhiz" wrote:

I believe this will work.

If Sheet1.Range("A90") = "" Then
Sheets("Sheet1").Unprotect
Rows(90).Hidden = True
Sheets("Sheet1").Protect
End If






"bryan" wrote in message
...
I'm a newbe with Excel vb. I've done a lot of vb with word but, have a
project with excel.
I have a spreadsheet which gets populated upon open like so:
Private Sub Workbook_Open()

Set objIRConn = CreateObject("irdesktopcontrol.irdesktopcontrolx")
objIRConn.Active = True

'Compnay
If Sheet1.Cells(4, 7) = "" Then
strCo = objIRConn.Filename
Sheet1.Cells(4, 7) = strCo
End If

What I want to do is hide row a90 if this is blank.
The Sheet is protected.

Thanks,
Bryan




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default hiding a row

If Sheet1.Cells(7, 3) = "" Then
Sheets("Sheet1").Unprotect Password:="mypass"
Rows(90).Hidden = True
Sheets("Sheet1").Protect Password:="mypass"


Gord Dibben MS Excel MVP


On Tue, 10 Mar 2009 07:42:10 -0700, bryan
wrote:

Almost...
What I am using is :
If Sheet1.Cells(7, 3) = "" Then
Sheets("Sheet1").Unprotect
Rows(90).Hidden = True
Sheets("Sheet1").Protect
End If

How can I do this without having the user input the password?

Thanks,
Bryan
"JLGWhiz" wrote:

I believe this will work.

If Sheet1.Range("A90") = "" Then
Sheets("Sheet1").Unprotect
Rows(90).Hidden = True
Sheets("Sheet1").Protect
End If






"bryan" wrote in message
...
I'm a newbe with Excel vb. I've done a lot of vb with word but, have a
project with excel.
I have a spreadsheet which gets populated upon open like so:
Private Sub Workbook_Open()

Set objIRConn = CreateObject("irdesktopcontrol.irdesktopcontrolx")
objIRConn.Active = True

'Compnay
If Sheet1.Cells(4, 7) = "" Then
strCo = objIRConn.Filename
Sheet1.Cells(4, 7) = strCo
End If

What I want to do is hide row a90 if this is blank.
The Sheet is protected.

Thanks,
Bryan





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hiding help with excel Excel Discussion (Misc queries) 1 March 9th 07 01:47 AM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding #N/A FP Novice Excel Discussion (Misc queries) 1 August 7th 06 09:49 PM
Hiding Column Also hiding text Cindy Excel Programming 0 April 6th 06 07:18 PM
hiding #N/A Shaun[_4_] Excel Programming 4 January 15th 04 04:24 PM


All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"