Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calling a VBA add in from a macro subroutine

Hi,

dont shoot me down in flames as im a newbie ;) I have an add in that
was kindly made by a collegue of mine It uses various functions and
has no subroutines. The add in works when you highlight a cell and
press the add in.

Im trying to make a sub routine that will call run this add in for
every cell . For some odd reason only the last cell in the list works
correctly and all the others are skipped

can anyone help ?



Range("A1").Select

Dim i As String
i = ActiveCell
If i "" Then
Application.Run "Myprogram.xla!RALShowmetherecord()"
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Calling a VBA add in from a macro subroutine

I don't think the code was what you got working, but maybe...

Option Explicit
Sub Testme()
Dim i As String
Range("A1").Select
do
i = ActiveCell.value
If i = "" Then
exit do
end if
Application.Run "Myprogram.xla!RALShowmetherecord()"
ActiveCell.Offset(1, 0).Select
Loop
End Sub

If this doesn't work, then maybe it's not your code that has the problem--maybe
it's something in the addin's procedure?????



wrote:

Hi,

dont shoot me down in flames as im a newbie ;) I have an add in that
was kindly made by a collegue of mine It uses various functions and
has no subroutines. The add in works when you highlight a cell and
press the add in.

Im trying to make a sub routine that will call run this add in for
every cell . For some odd reason only the last cell in the list works
correctly and all the others are skipped

can anyone help ?

Range("A1").Select

Dim i As String
i = ActiveCell
If i "" Then
Application.Run "Myprogram.xla!RALShowmetherecord()"
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub


--

Dave Peterson
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
HELP! Calling subroutine in different workbook ChrisWalker Excel Programming 3 March 1st 06 11:32 AM
Calling a subroutine in a loop Jeff@DE Excel Programming 1 January 9th 06 09:56 AM
calling a subroutine outside a spreadsheet dino Excel Programming 5 June 11th 04 06:14 PM
Function Calling Subroutine Curare Excel Programming 1 February 24th 04 07:11 PM
Calling the Solver via a subroutine James[_8_] Excel Programming 1 July 10th 03 01:08 AM


All times are GMT +1. The time now is 08:50 AM.

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"