Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exel VBA - Clearing clipboard, area names

Hi!

I'm just a rookie with VBA so don't get mad if I'm asking obviou
questions here.

Microsoft Excel-2000

1) I have a problem with writing a VBA code which would clear all th
clipboard. Othervise I have broblems with these dialog boxes which ar
asking to save or not to save clipboard.

2) I have also an other question about giving names to ranges in VB
code. If i have celected a cell with a function, so that's not
constant, how can I give the name for the cell/ range? I tried this bu
it didn't work:

Selection.Names.Add Name:="name

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Exel VBA - Clearing clipboard, area names

1) Code from ?
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As
Long
Public Declare Function CloseClipboard Lib "user32" () As Long
Public Declare Function EmptyClipBoard Lib "user32" Alias "EmptyClipboard"
() As Long
Sub EmptyClipBoard()
OpenClipboard (0&)
EmptyClipBoard
CloseClipboard
End Sub
2)
ActiveWorkbook.Names.Add "Name", Selection.Address

HTH
Regards
Pascal

"Timse " a écrit dans le message de
...
Hi!

I'm just a rookie with VBA so don't get mad if I'm asking obvious
questions here.

Microsoft Excel-2000

1) I have a problem with writing a VBA code which would clear all the
clipboard. Othervise I have broblems with these dialog boxes which are
asking to save or not to save clipboard.

2) I have also an other question about giving names to ranges in VBA
code. If i have celected a cell with a function, so that's not a
constant, how can I give the name for the cell/ range? I tried this but
it didn't work:

Selection.Names.Add Name:="name"


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Exel VBA - Clearing clipboard, area names

Please change
Sub EmptyClipBoard()
To
Sub EmptyTheClipBoard()

Apologies
Regards
Pascal

"Timse " a écrit dans le message de
...
Hi!

I'm just a rookie with VBA so don't get mad if I'm asking obvious
questions here.

Microsoft Excel-2000

1) I have a problem with writing a VBA code which would clear all the
clipboard. Othervise I have broblems with these dialog boxes which are
asking to save or not to save clipboard.

2) I have also an other question about giving names to ranges in VBA
code. If i have celected a cell with a function, so that's not a
constant, how can I give the name for the cell/ range? I tried this but
it didn't work:

Selection.Names.Add Name:="name"


---
Message posted from http://www.ExcelForum.com/



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
clearing the clipboard [email protected] Excel Discussion (Misc queries) 2 April 25th 07 09:11 AM
clearing the clipboard mike Excel Programming 1 March 4th 04 08:34 PM
Excel clearing clipboard [email protected] Excel Programming 1 February 9th 04 03:12 PM
Clearing clipboard Charles Maxson Excel Programming 1 December 1st 03 02:46 PM
Clearing clipboard Gord Dibben Excel Programming 1 November 27th 03 11:37 AM


All times are GMT +1. The time now is 02:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"