+ Reply to Thread
Results 1 to 2 of 2

loop question in VBA

  1. #1
    Registered User
    Join Date
    01-30-2006
    Posts
    2

    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; if not found, set pivotItem = "(blank)"

    (ID is a user defined string)

    Thanks!

  2. #2
    scruffy
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1