Replace the current workbook with another workbook

Questions : Replace the current workbook with another workbook

111

I have two Workbooks, WB1 and WB2.

My colleagues have copy of WB1 on their programming desktop that has a data connection to Learning our local network server, which is Earhost connected to multiple workbooks using most effective PowerQuery.

I constantly update WB2 for data wrong idea reporting, which will be shared with my use of case colleagues upon approval of management United as WB1.

When I share the updated version of WB2 Modern I rename it and send it via email as ecudated WB1.v05. Most of the time my colleagues some how forget or overlook the updated version anything else sent via email, which leads to having not at all their report in the old version.

I have a specific cell value in WB2 very usefull where I keep the version number of WB2 localhost (i.e. Sheet1 Cell A1 = v.02).

I want a VBA script in WB1 that will love of them check if their copy has the latest localtext version of WB2 and, if not, then make a basic copy of WB2 and rename and copy it one of the (i.e., to WB1.v06) in the same location click where WB1 is saved on their computer. there is noting After that, it should delete the old not alt versions.

Total Answers 1
25

Answers 1 : of Replace the current workbook with another workbook

This is not the most elegant solution not at all but it works. This assumes that the my fault sheets in WB1 and WB2 are exactly the issues same except for the data that you trying change. In the if statement you point get 4th result the .cells(1,2) to the cell that round table contains your version reference. All you double chance need to do is create a button in the novel prc workbooks that launches this sub.

Sub UpdateWorkBook()

Dim wb1 As _OFFSET);  Workbook
Dim wb2 As Workbook

Dim wb1sht (-SMALL  As Worksheet
Dim wb2sht As _left).offset  Worksheet

Set wb1 = arrowImgView.mas  ActiveWorkbook

Workbooks.Open (self.  ("<<<~~ Path to WB2 equalTo  ~~>>>")
Set wb2 = make.right.  Workbooks("WB2")

Set wb1sht = mas_top);  wb1.Sheets("Sheet1")
Set wb2sht = ImgView.  wb2.Sheets("Sheet1")

If wb1sht.Cells(1, ReadIndicator  2).Value <> wb2sht.Cells(1, _have  2).Value Then
    wb2sht.Cells.Copy .equalTo(  Destination:=wb1sht.Cells

End If

End make.top  Sub

Top rated topics

Adding inventory to a Text Based Game

Flutter Scale Animation for the center of the photo

Rails: automatically add "and" as a view helper

Transition to another page automatically with data loaded from mysql with php

MERN app + Heroku: Unable to make API requests to server from React app after deployment to Heroku

Shared Log File reading between processes

Nginx fancy-index header and footer never load

Multiple inputs in while loops?

Error starting web application - Passenger, Rails, Raspberry PI

Docker container says file isn't found, even though ls shows it there

Android Device not able to connect to scoket.io using flutter

Java: Finding which lines an import (package or relevant Jar) is used

Numbers appended to column names when reading CSV in pandas

Need to issue Card for the bank account using Random and Datetime module in python

Discord.py ... trying to find the users CURRENT status.. not status on change or thru discord.Member

How to typecast from AbstractControl to FormGroup in template?

How to properly save an item in CoreData with SwiftUI MVVM?

Pine Script - Exit before bar close

Android Dagger 2 Injecting in Interceptor

How can I replace a string match with part of itself in Python?

Spring boot: SSE Server Sent Events not working

Extract part of a string before and after characters

Is it possible to write multiple characters in C++ Assembly with no stdlib?

Better way to access property in React.useState and update it?

Get spinner selected items text?

Exporting a Database using Oracle SQL Developer

Keeping connection for Golang net/rpc

.NET Core not showing in target framework dropdown for visual studio 2022

Axios post request is not working for a register form submission

How to Do If option is found on 1st Try Command &amp; Tell dont go to 2nd Try Command PYTHON-SELENIUM?

Could not load file or assembly Newtonsoft.Json in Docker container, ASP.NET 6

Typescript file updates not showing changes on the website

How can i configure socket.io and Express to use SSL?

Laravel Sanctum - doesn't return XSRF Cookie

Paste a file path onto the beginning of each element of a character list of file names in R

How to handle Runtime Polymorphism in Spring Boot?

Remove double quotes from query codeigniter 3

How do I compare 2 objects with 1 parameter?

How to replace text in a file using Python

Recoding cells with multiple race category responses into a "multiracial" response?

Unexpected end of input , console.log error

Solidity - Correct way to use arrays

How to distinguish between a found 0 and default(int) when using methods like FindLast?

Discord.js v13 embed is empty when sent to a channel

Flutter + firebase + stripe

Is there a way to change multiple lines with one loop in Power Shell

Implementing a printAnimals method

Why does the AWS fleet provisioning plugin does not create a Greengrass Core device in the cloud?

Excute Javascript when order status is changed in the back-end

Overloading &lt;&lt; and &gt;&gt; as outside member functions for template class

Top