Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #108748 > unrolled thread

Suggestions please

Started bypctamers@pctamers.eu
First post2016-04-15 07:54 -0700
Last post2016-04-18 14:29 +0200
Articles 4 — 3 participants

Back to article view | Back to microsoft.public.excel.programming


Contents

  Suggestions please pctamers@pctamers.eu - 2016-04-15 07:54 -0700
    Re: Suggestions please Claus Busch <claus_busch@t-online.de> - 2016-04-15 17:31 +0200
      Re: Suggestions please Steve <pctamers@pctamers.eu> - 2016-04-18 05:14 -0700
        Re: Suggestions please Claus Busch <claus_busch@t-online.de> - 2016-04-18 14:29 +0200

#108748 — Suggestions please

Frompctamers@pctamers.eu
Date2016-04-15 07:54 -0700
SubjectSuggestions please
Message-ID<fa00c318-6f91-4ae0-bb83-6586d086dd6c@googlegroups.com>
Help! (Please)

I have inherited a set of macros/functions which insert a signature into a cell. These seem very complicated to me (I've done a similar thing myself but in a much simpler fashion). Unfortunately this one is looping - it seems to not recognise when the signature is in the cell, so when the "Submit" button is clicked again, it simply runs again. I should add that this used to launch some Topaz software but I have got it working with my "own" vba which launches Paint to allow the signature to be input.

All I need addressing is the fact that it's not recognising the signature and so is looping.

Can anyone help please?

[toc] | [next] | [standalone]


#108749

FromClaus Busch <claus_busch@t-online.de>
Date2016-04-15 17:31 +0200
Message-ID<ner19r$9it$1@dont-email.me>
In reply to#108748
Hi Steve,

Am Fri, 15 Apr 2016 07:54:05 -0700 (PDT) schrieb pctamers@pctamers.eu:

> All I need addressing is the fact that it's not recognising the signature and so is looping.

is that Paint shape the only shape in the sheet? If so you can check in 
Button_Click event 

If Activesheet.Shapes.Count = 1 then
	exit sub
else
	call your macro
end if


Regards
Claus B.
-- 
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

[toc] | [prev] | [next] | [standalone]


#108777

FromSteve <pctamers@pctamers.eu>
Date2016-04-18 05:14 -0700
Message-ID<f99fe83c-f71a-4a66-b922-ff4c0a84b7ce@googlegroups.com>
In reply to#108749
Hi Claus

I kind of hoped you might pick this one up ;o)  Thanks again. There were six other shapes in this sheet, so I used your code but changed to "If Activesheet.Shapes.Count = 1 then . . ."

Thank you

Steve

[toc] | [prev] | [next] | [standalone]


#108778

FromClaus Busch <claus_busch@t-online.de>
Date2016-04-18 14:29 +0200
Message-ID<nf2jok$vsu$1@dont-email.me>
In reply to#108777
Hi Steve,

Am Mon, 18 Apr 2016 05:14:59 -0700 (PDT) schrieb Steve:

> I kind of hoped you might pick this one up ;o)  Thanks again. There were six other shapes in this sheet, so I used your code but changed to "If Activesheet.Shapes.Count = 1 then . . ."

if that Paint shape has a special name you could check for this name:

Dim shp As Shape

For Each shp In ActiveSheet.Shapes
    If shp.Name = "Textbox 1" Then
        Exit Sub
    Else
        'Your Code
    End If
Next

Or you can check the position:

Dim shp As Shape
Dim sigCell As Range

Set sigCell = Range("G14")
For Each shp In ActiveSheet.Shapes
    If Int(shp.Left) = Int(sigCell.Left) And _
        Int(shp.Top) = Int(sigCell.Top) Then
        Exit Sub
    Else
        'Your code
    End If
Next


Regards
Claus B.
-- 
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

[toc] | [prev] | [standalone]


Back to top | Article view | microsoft.public.excel.programming


csiph-web