Posts by edelauna

    Hello,
    I am trying to write a macro for an option button, that when selected it checks to see if another option button is selected then continues to automatically change the value of 5 other option button within in 5 other group boxes


    Code
    Sub SetFilter()
        'check to see if filtering is required 
        If Sheet1.Shapes("Option Button 54").value = True Then
            'set non-specific filtering
            Sheet1.Shapes("Option Button 28").Value = xlOn
            Sheet1.Shapes("Option Button 38").Value = xlOn
            Sheet1.Shapes("Option Button 44").Value = xlOn
            Sheet1.Shapes("Option Button 52").Value = xlOn
        End If
    End Sub


    Any help would be greatly appreciated, I think I am missing a simple concept.

    Re: Error In Working With Arrays


    I am getting an error, subscript is out of range this is my code in full:
    Should I be doing something to set the dimensions again?

    Re: Error In Working With Arrays


    ahh ok thank you. Now how do I access these variable within the array? I am trying to do the following:

    Code
    For x = I To 0 Step -1
            strMsg = strMsgs & Chr(149) & " " & strProjects(x) & vbNewLine
        Next x

    Re: Is Date Past X Weeks From Current Date


    The equations does not seem to work. Regardless of what the date is this if statement always runs?
    I have changed the value to any date in 2006,2009, 2007, the cell is always marked red.

    Code
    If ((Range("H", x) - Date) < 14) Then ' even if the symbol is > red still runs.
                    red (x)

    Hello,
    I'm trying to create an array of strings and I thought I was doing it correct via :

    Code
    :
        Dim strProjects() As String
        Dim count As Integer
        count = 1
        For x = ActiveSheet.Range("C65536").End(xlUp).Row To 3 Step -1
            If CDate(ActiveSheet.Range("H" & x).Value) = Date And Cells(x, 3) = "1" Then
                strProjects(count) = Cells(x, "E") ' error happens at this line?
                count = 1 + count
            End If
        Next x


    The error says the cursor cannot be identified, or Run time error 9? I do not know what I am doing wrong.

    I am having some troubles inserting an image than centering it within the cell.
    When I do this:

    Code
    Set rng = Target.Cells
                With pic
                    .Height = rng.Height 
                    .Width = rng.Width 
                    .Left = rng.Left 
                    .Top = rng.Top 
                End With


    The picture fits within the borders of the cell, but when I do this:

    Code
    Set rng = Target.Cells
                With pic
                    .Height = rng.Height /2
                    .Width = rng.Width /2
                    .Left = rng.Left /2
                    .Top = rng.Top /2
                End With


    The picture is the right size but not within the cell.

    Hello


    Which function would I use if I wanted a macro to run upon the user either clicking on a cell within a certain column, or tabbing to a certain column.


    Right now I am using

    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
    End Sub


    But it doesn't take effect until after the user has inputted something into the cell.

    Hello,


    I have attached an example spreadsheet to describe what I am working with. I was wondering if there is an easy way to have it so that everything in Column A is hyper linked to the ship bill file. This list can exceed over 1000 and to hyper link each line is too much, is there an automatic way to do this?


    For example. I would like the value '00001 in cell A2, to be hyper linked to the file "Shipping Bill - 00001" So that I can just click on the link and open up the file.


    The shipping bill files are in the same folder as the example spreadsheet.

    Re: Print Outside File From Spreadsheet


    Matthew,


    Ok so now Adobe open but it says it cannot find the file, in column H it displays,
    G:\Contract Folders\30101 - Toyota, Paint\30101 - Detail Drawings\a106188.pdf


    I've checked and there is a file there named this. Why do you think I am getting this error, is it becuase there are spaces in the folders name?

    Re: Print Outside File From Spreadsheet


    Matt,


    Thank you for your help, but I'm getting the error "Method 'Run' of Object 'IWshShell3' Failed.


    this is the code I've used.


    And attached is a copy of my print test page, did I make a mistake in transferring the information.