Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default loop question in VBA


I want to have a code doing the following task:
compare each pivotItem in the pivotField with ID until ID is found; i
not found, set pivotItem = "(blank)"

(ID is a user defined string)

Thanks

--
h2
-----------------------------------------------------------------------
h2o's Profile: http://www.excelforum.com/member.php...fo&userid=3098
View this thread: http://www.excelforum.com/showthread.php?threadid=50732

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default loop question in VBA

h2o,
The following code checks to and see if a field or value is blank and if it
is place the user ID in the cell. If you set the cell as a range with slight\
modification it might accomplish what you are wanting to do.

Private Sub Workbook_Open()
ActiveSheet.Unprotect Password:="password"
If Worksheets("Sheet1").Range("User") = "" Then
Worksheets("Sheet1").Range("User") = Application.UserName
End If
ActiveSheet.Protect Password:="password"
End Sub

HTH
scruffy

"h2o" wrote:


I want to have a code doing the following task:
compare each pivotItem in the pivotField with ID until ID is found; if
not found, set pivotItem = "(blank)"

(ID is a user defined string)

Thanks!


--
h2o
------------------------------------------------------------------------
h2o's Profile: http://www.excelforum.com/member.php...o&userid=30987
View this thread: http://www.excelforum.com/showthread...hreadid=507324


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
Next and Loop Question Paige Excel Programming 3 December 5th 05 11:35 PM
end with loop question Lee Hunter Excel Programming 2 November 3rd 05 08:14 PM
loop question choice[_2_] Excel Programming 7 October 30th 05 05:41 AM
do until...loop question Marcotte A Excel Programming 0 June 14th 04 08:47 PM
loop question dabith Excel Programming 6 June 13th 04 05:28 PM


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

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

About Us

"It's about Microsoft Excel"