Related:
- Data frm one excel sheet to other excel sheet
- Mark sheet in excel - Guide
- How to open excel sheet in notepad++ - Guide
- How to screenshot excel sheet - Guide
- Google sheet right to left - Guide
- Windows network commands cheat sheet - Guide
4 responses
My question is i want to paste sum added data on other excel sheet so that data automatically make changes when i make value change it automatically change the other values in total.
Thanks
Thanks
Hi this rohan raut.
I really frustreted to solve my problem.
Please help me to solve this problem as early as possible.
Qestion--> I created "vsto" application . in that i took a excel file as form, now i added one button on excel sheet1 and gie the sheet1 name as "MAIN". whn i click on that button then i want to generate new sheet and that sheet i want to add a picture box on that new sheet.
I give u a code that i write on my Project.
CODE: Dim pic = New System.Windows.Forms.PictureBox
Dim m As Integer
' Dim excel As New Excel.Application
'Dim Sheets = excel.Sheets
Dim thsWB As New Global.Framewin.ThisWorkbook
Dim ActiveSheet = thsWB.ActiveSheet
'Dim thWS As Global.Framewin.Sheet1
'Dim skitap = Excel.Worksheets
Dim myform = New PictureBox
m = 5
For i = 0 To NoOfFloor - 1
Cells(m, 2).value = Floor(i).PlanFileName
m += 2
Next
For i = 0 To NoOfFloor - 1
Me.Application.Sheets.Add()
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Image." & i, Link:=False, _
DisplayAsIcon:=False, Left:=192.75, Top:=90, Width:=384.75, Height:= _
271.5).Select()
'Application.Sheets.Add()
'Dim thws = thsWB.ActiveSheet
'thws = thsWB.Worksheets("Sheet1").Activate
'Me.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'thsWB.ActiveSheet.controls.addpicturebox(49, 44, 817, 563, "PB" & i)
'Me.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'ActiveWorkbook.Sheets.Add After:=Worksheets("Start"), Count:=1, Type:=xlWorksheet
'shht = Me.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'shht.Name = "Level " & i 'Floor(i).PlanFileName
' Me.Application.Sheets("Level0").select()
'shht.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'Me.Shapes.AddPicture("C:\Documents and Settings\Admin\Desktop\Picture\taj.bmp", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 50, 50, 700, 500)
'xlWorkSheet.Shapes.AddPicture("C:\\csharp-xl-picture.JPG", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 50, 50, 300, 45)
Next
Plz send reply if u know or having idea about that.
Thanking You.
I really frustreted to solve my problem.
Please help me to solve this problem as early as possible.
Qestion--> I created "vsto" application . in that i took a excel file as form, now i added one button on excel sheet1 and gie the sheet1 name as "MAIN". whn i click on that button then i want to generate new sheet and that sheet i want to add a picture box on that new sheet.
I give u a code that i write on my Project.
CODE: Dim pic = New System.Windows.Forms.PictureBox
Dim m As Integer
' Dim excel As New Excel.Application
'Dim Sheets = excel.Sheets
Dim thsWB As New Global.Framewin.ThisWorkbook
Dim ActiveSheet = thsWB.ActiveSheet
'Dim thWS As Global.Framewin.Sheet1
'Dim skitap = Excel.Worksheets
Dim myform = New PictureBox
m = 5
For i = 0 To NoOfFloor - 1
Cells(m, 2).value = Floor(i).PlanFileName
m += 2
Next
For i = 0 To NoOfFloor - 1
Me.Application.Sheets.Add()
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Image." & i, Link:=False, _
DisplayAsIcon:=False, Left:=192.75, Top:=90, Width:=384.75, Height:= _
271.5).Select()
'Application.Sheets.Add()
'Dim thws = thsWB.ActiveSheet
'thws = thsWB.Worksheets("Sheet1").Activate
'Me.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'thsWB.ActiveSheet.controls.addpicturebox(49, 44, 817, 563, "PB" & i)
'Me.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'ActiveWorkbook.Sheets.Add After:=Worksheets("Start"), Count:=1, Type:=xlWorksheet
'shht = Me.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'shht.Name = "Level " & i 'Floor(i).PlanFileName
' Me.Application.Sheets("Level0").select()
'shht.Controls.AddPictureBox(49, 44, 817, 563, "PB" & i)
'Me.Shapes.AddPicture("C:\Documents and Settings\Admin\Desktop\Picture\taj.bmp", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 50, 50, 700, 500)
'xlWorkSheet.Shapes.AddPicture("C:\\csharp-xl-picture.JPG", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 50, 50, 300, 45)
Next
Plz send reply if u know or having idea about that.
Thanking You.
Dear Sree,
You manually copy and paste the data in the sheets or
still you can create a macro for copying it. Below is the
macro codes that you will have to use:
Sub CopyDataToPlan()
Dim LDate As String
Dim LColumn As Integer
Dim LFound As Boolean
On Error GoTo Err_Execute
'Retrieve date value to search for
LDate = Sheets("Rolling Plan").Range("B4").Value
Sheets("Plan").Select
'Start at column B
LColumn = 2
LFound = False
While LFound = False
'Encountered blank cell in row 2, terminate search
If Len(Cells(2, LColumn)) = 0 Then
MsgBox "No matching date was found."
Exit Sub
'Found match in row 2
ElseIf Cells(2, LColumn) = LDate Then
'Select values to copy from "Rolling Plan" sheet
Sheets("Rolling Plan").Select
Range("B5:H6").Select
Selection.Copy
'Paste onto "Plan" sheet
Sheets("Plan").Select
Cells(3, LColumn).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
LFound = True
MsgBox "The data has been successfully copied."
'Continue searching
Else
LColumn = LColumn + 1
End If
Wend
On Error GoTo 0
Exit Sub
Err_Execute:
MsgBox "An error occurred."
End Sub
Thanks in advance.
You manually copy and paste the data in the sheets or
still you can create a macro for copying it. Below is the
macro codes that you will have to use:
Sub CopyDataToPlan()
Dim LDate As String
Dim LColumn As Integer
Dim LFound As Boolean
On Error GoTo Err_Execute
'Retrieve date value to search for
LDate = Sheets("Rolling Plan").Range("B4").Value
Sheets("Plan").Select
'Start at column B
LColumn = 2
LFound = False
While LFound = False
'Encountered blank cell in row 2, terminate search
If Len(Cells(2, LColumn)) = 0 Then
MsgBox "No matching date was found."
Exit Sub
'Found match in row 2
ElseIf Cells(2, LColumn) = LDate Then
'Select values to copy from "Rolling Plan" sheet
Sheets("Rolling Plan").Select
Range("B5:H6").Select
Selection.Copy
'Paste onto "Plan" sheet
Sheets("Plan").Select
Cells(3, LColumn).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
LFound = True
MsgBox "The data has been successfully copied."
'Continue searching
Else
LColumn = LColumn + 1
End If
Wend
On Error GoTo 0
Exit Sub
Err_Execute:
MsgBox "An error occurred."
End Sub
Thanks in advance.