#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default ready to paste

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default ready to paste

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default ready to paste

Thank You Jacob,
But it paste the text in active cell in excel. I want the text should be in
clipboard(not in any cell in excel) and able to paste in other application
(say..notepad, if I press Ctrl+V in notepad, the text should paste in
notepad). I just need it bcz, I have to process many text documents with the
help of information given in one excel. Wherever I need, the given text
should paste in notepad. Currently, I am copying this codes from other excel
and copy them and paste in notepad. It irritates me.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default ready to paste

Thank You Jacob Skaria,
But I need the text should paste in notepad. My job is to process text
files regularly and wherever needed in text file, the different sets of text
codes should paste. I got idea to make it easy to set shortcut to copy and
paste trough excel. I have 20 sets of codes. If I press one certain
shortcut key in excel, the related code should ready to paste in notepad. If
I press Ctrl+V, the code should paste. I think you understand the situation.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default ready to paste

You will need to use the Windows Clipboard object..

Refer
http://www.cpearson.com/excel/Clipboard.aspx
--
If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Thank You Jacob Skaria,
But I need the text should paste in notepad. My job is to process text
files regularly and wherever needed in text file, the different sets of text
codes should paste. I got idea to make it easy to set shortcut to copy and
paste trough excel. I have 20 sets of codes. If I press one certain
shortcut key in excel, the related code should ready to paste in notepad. If
I press Ctrl+V, the code should paste. I think you understand the situation.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default ready to paste

Thank You Jacob Skaria,
But I need the text should paste in notepad. My job is to process text
files regularly and wherever needed in text file, the different sets of text
codes should paste. I got idea to make it easy to set shortcut to copy and
paste trough excel. I have 20 sets of codes. If I press one certain
shortcut key in excel, the related code should ready to paste in notepad. If
I press Ctrl+V, the code should paste. I think you understand the situation.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default ready to paste

Dear Jacob,
I wrote below code, but it retrieves only S2. And, there should be tab
between €śDITCS€ť and €śNOT FOUND€ť.

Sub cilp()
Dim DataObj As New MSForms.DataObject
Dim S1 As String
Dim S2 As String
S1 = "DITCS Not Found"
S2 = "LPSCS Not Found"
DataObj.SetText S1
DataObj.PutInClipboard
DataObj.SetText S2
DataObj.PutInClipboard
End Sub


"Jacob Skaria" wrote:

You will need to use the Windows Clipboard object..

Refer
http://www.cpearson.com/excel/Clipboard.aspx
--
If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Thank You Jacob Skaria,
But I need the text should paste in notepad. My job is to process text
files regularly and wherever needed in text file, the different sets of text
codes should paste. I got idea to make it easy to set shortcut to copy and
paste trough excel. I have 20 sets of codes. If I press one certain
shortcut key in excel, the related code should ready to paste in notepad. If
I press Ctrl+V, the code should paste. I think you understand the situation.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default ready to paste

Thanks Jacob Skaria. Sorry for late response, since i was in ocassion.

"Jacob Skaria" wrote:

You will need to use the Windows Clipboard object..

Refer
http://www.cpearson.com/excel/Clipboard.aspx
--
If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Thank You Jacob Skaria,
But I need the text should paste in notepad. My job is to process text
files regularly and wherever needed in text file, the different sets of text
codes should paste. I got idea to make it easy to set shortcut to copy and
paste trough excel. I have 20 sets of codes. If I press one certain
shortcut key in excel, the related code should ready to paste in notepad. If
I press Ctrl+V, the code should paste. I think you understand the situation.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default ready to paste

Try the below

Sub cilp()
Dim DataObj As New MSForms.DataObject
Dim S1 As String
Dim S2 As String
S1 = "DITCS Not Found"
S2 = "LPSCS Not Found"
DataObj.SetText S1 & vbTab & S2
DataObj.PutInClipboard
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Dear Jacob,
I wrote below code, but it retrieves only S2. And, there should be tab
between €śDITCS€ť and €śNOT FOUND€ť.

Sub cilp()
Dim DataObj As New MSForms.DataObject
Dim S1 As String
Dim S2 As String
S1 = "DITCS Not Found"
S2 = "LPSCS Not Found"
DataObj.SetText S1
DataObj.PutInClipboard
DataObj.SetText S2
DataObj.PutInClipboard
End Sub


"Jacob Skaria" wrote:

You will need to use the Windows Clipboard object..

Refer
http://www.cpearson.com/excel/Clipboard.aspx
--
If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Thank You Jacob Skaria,
But I need the text should paste in notepad. My job is to process text
files regularly and wherever needed in text file, the different sets of text
codes should paste. I got idea to make it easy to set shortcut to copy and
paste trough excel. I have 20 sets of codes. If I press one certain
shortcut key in excel, the related code should ready to paste in notepad. If
I press Ctrl+V, the code should paste. I think you understand the situation.

Thanks
Narendar


"Jacob Skaria" wrote:

If you are looking at a macro; the below should do. If you are new to macros
set the Security level to low/medium in (Tools|Macro|Security). From workbook
launch VBE using short-key Alt+F11. From menu 'Insert' a module and paste the
below code. Save. Get back to Workbook. Run macro from Tools|Macro|Run
<selected macro() You can also assign a hot key for this macro...and access
it from any worksheet..


Sub Macro()
Dim strData As String, arrData As Variant
strData = "DITCS,LPSCS,LPSRS,LPSNRS"
arrData = Split(strData, ",")
ActiveCell.Resize(4, 2) = "Not found"
ActiveCell.Resize(4) = WorksheetFunction.Transpose(arrData)
End Sub




If this post helps click Yes
---------------
Jacob Skaria


"Narendra Boga" wrote:

Hi all,
I just need a macro which is stored in clipboard and ready to paste in any
other application. Example: I have a predefined string set as below:

DITCS Not Found
LPSCS Not Found
LPSRS Not Found
LPSNRS Not Found

If I press any shortcut, the above 4 line should ready to paste at any other
location.

Please help me...

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
Make graphs in Excel all the same size ready to paste into Word - sub210 Charts and Charting in Excel 4 April 25th 23 11:47 AM
READY BAR MrDodd Excel Discussion (Misc queries) 2 July 31st 08 05:54 PM
how to set up a 60 day ready reckoner David Rodrigo Excel Discussion (Misc queries) 3 December 17th 07 12:21 AM
SHOW SUM ON READY BAR CNCLARK Excel Discussion (Misc queries) 1 August 29th 07 02:20 PM
Help I Am Ready To Give Up kynhart Excel Worksheet Functions 3 October 20th 05 05:11 AM


All times are GMT +1. The time now is 04:57 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"