Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with code


The following code is returning a Compile Error: Automation type no
supported in visual basic. The underlined portion of the code is wha
is highlighted when I get the error message.

Regards,

EP

Sub Button9_Click()

Dim _Answer_As_VbMsgBoxResult_
Dim blnCopy As Boolean
If Sheets("Data").Range("Y3").Value
Sheets("Input").Range("G9").Value Then
CopyData:
********Sheets("Input").Range("G15:H29").Copy
********Sheets("Data").Range("D114").PasteSpecial Paste:=xlValues
SkipBlanks:=True
********Sheets("Input").Range("G15:H29").ClearCont ents
********Sheets("Input").Range("L15:M24").Copy
********Sheets("Data").Range("D130").PasteSpecial Paste:=xlValues
********Sheets("Input").Range("L15:M24").ClearCont ents
If blnCopy = True Then GoTo ResumeHere
**blnCopy = True
End If
If Range("C15").Value < Range("F15").Value = False Then
********Answer = MsgBox("These dates have already been entered. Do yo
want to continue?", vbYesNo)
End If
If Answer = vbYes Then
*GoTo CopyData
ResumeHe
ElseIf Answer = vbNo Then
** 'Do Nothing
End If
Continue:
****Application.CutCopyMode = False
End Su

--
edwardpestia
-----------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...fo&userid=3380
View this thread: http://www.excelforum.com/showthread.php?threadid=53748

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with code

Just declare it as Long.

edwardpestian wrote:
The following code is returning a Compile Error: Automation type not
supported in visual basic. The underlined portion of the code is what
is highlighted when I get the error message.

Regards,

EP

Sub Button9_Click()

Dim _Answer_As_VbMsgBoxResult_
Dim blnCopy As Boolean
If Sheets("Data").Range("Y3").Value =
Sheets("Input").Range("G9").Value Then
CopyData:
********Sheets("Input").Range("G15:H29").Copy
********Sheets("Data").Range("D114").PasteSpecial Paste:=xlValues,
SkipBlanks:=True
********Sheets("Input").Range("G15:H29").ClearCont ents
********Sheets("Input").Range("L15:M24").Copy
********Sheets("Data").Range("D130").PasteSpecial Paste:=xlValues
********Sheets("Input").Range("L15:M24").ClearCont ents
If blnCopy = True Then GoTo ResumeHere
**blnCopy = True
End If
If Range("C15").Value < Range("F15").Value = False Then
********Answer = MsgBox("These dates have already been entered. Do you
want to continue?", vbYesNo)
End If
If Answer = vbYes Then
*GoTo CopyData
ResumeHe
ElseIf Answer = vbNo Then
** 'Do Nothing
End If
Continue:
****Application.CutCopyMode = False
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with code


I'm new to VBA, so this is a learing experience for me. Can you tell me
how to declare it as long.

Regards,

EP


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=537485

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help with code

Dim Answer As Long



edwardpestian wrote:

I'm new to VBA, so this is a learing experience for me. Can you tell me
how to declare it as long.

Regards,

EP

--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=537485


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Help with code

Sorry to break the rule of not asking a question here;
but how do I start a new thread?
Clicked on New, then ? new question, then nothing happened.
Could not type in the box. Notihing in Help.
--
Occasionally stumped


"edwardpestian" wrote:


The following code is returning a Compile Error: Automation type not
supported in visual basic. The underlined portion of the code is what
is highlighted when I get the error message.

Regards,

EP

Sub Button9_Click()

Dim _Answer_As_VbMsgBoxResult_
Dim blnCopy As Boolean
If Sheets("Data").Range("Y3").Value =
Sheets("Input").Range("G9").Value Then
CopyData:
********Sheets("Input").Range("G15:H29").Copy
********Sheets("Data").Range("D114").PasteSpecial Paste:=xlValues,
SkipBlanks:=True
********Sheets("Input").Range("G15:H29").ClearCont ents
********Sheets("Input").Range("L15:M24").Copy
********Sheets("Data").Range("D130").PasteSpecial Paste:=xlValues
********Sheets("Input").Range("L15:M24").ClearCont ents
If blnCopy = True Then GoTo ResumeHere
**blnCopy = True
End If
If Range("C15").Value < Range("F15").Value = False Then
********Answer = MsgBox("These dates have already been entered. Do you
want to continue?", vbYesNo)
End If
If Answer = vbYes Then
*GoTo CopyData
ResumeHe
ElseIf Answer = vbNo Then
** 'Do Nothing
End If
Continue:
****Application.CutCopyMode = False
End Sub


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=537485




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help with code

You're posting through the Microsoft Communities web site, right?

There's a New button/icon to the left of the "Show" (all threads, etc) that you
can click on.



Two-Canucks wrote:

Sorry to break the rule of not asking a question here;
but how do I start a new thread?
Clicked on New, then ? new question, then nothing happened.
Could not type in the box. Notihing in Help.
--
Occasionally stumped

"edwardpestian" wrote:


The following code is returning a Compile Error: Automation type not
supported in visual basic. The underlined portion of the code is what
is highlighted when I get the error message.

Regards,

EP

Sub Button9_Click()

Dim _Answer_As_VbMsgBoxResult_
Dim blnCopy As Boolean
If Sheets("Data").Range("Y3").Value =
Sheets("Input").Range("G9").Value Then
CopyData:
********Sheets("Input").Range("G15:H29").Copy
********Sheets("Data").Range("D114").PasteSpecial Paste:=xlValues,
SkipBlanks:=True
********Sheets("Input").Range("G15:H29").ClearCont ents
********Sheets("Input").Range("L15:M24").Copy
********Sheets("Data").Range("D130").PasteSpecial Paste:=xlValues
********Sheets("Input").Range("L15:M24").ClearCont ents
If blnCopy = True Then GoTo ResumeHere
**blnCopy = True
End If
If Range("C15").Value < Range("F15").Value = False Then
********Answer = MsgBox("These dates have already been entered. Do you
want to continue?", vbYesNo)
End If
If Answer = vbYes Then
*GoTo CopyData
ResumeHe
ElseIf Answer = vbNo Then
** 'Do Nothing
End If
Continue:
****Application.CutCopyMode = False
End Sub


--
edwardpestian
------------------------------------------------------------------------
edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809
View this thread: http://www.excelforum.com/showthread...hreadid=537485



--

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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
run code on opening workbook and apply code to certain sheets Jane Excel Programming 7 August 8th 05 09:15 AM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM


All times are GMT +1. The time now is 05:03 PM.

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"